9
Lecture, week 03 The z -transformation — Part I Week 03, INF3190/4190 Andreas Austeng Department of Informatics, University of Oslo September 2019 AA, IN3190/4190 (Ifi/UiO) Lecture, week 03 Sept. 2019 1 / 36 Outline Outline 1 Motivation z -domain: One of three domains to study Transfer function (or system function) 2 The z -transform Definition of the z -transform Rational functions Region of convergence (ROC) Table of z -transform pairs Quiz 3 The Inverse z -transform Approaches Partial fraction expansion 4 Properties of the z -transform] Properties AA, IN3190/4190 (Ifi/UiO) Lecture, week 03 Sept. 2019 2 / 36 Motivation Outline 1 Motivation z -domain: One of three domains to study Transfer function (or system function) 2 The z -transform Definition of the z -transform Rational functions Region of convergence (ROC) Table of z -transform pairs Quiz 3 The Inverse z -transform Approaches Partial fraction expansion 4 Properties of the z -transform] Properties AA, IN3190/4190 (Ifi/UiO) Lecture, week 03 Sept. 2019 3 / 36 Motivation z-domain: One of three domains to study 3 domains We can analyze digital signals and systems in three different domains: I n-domain or time domain F The domain of sequences, impulse responses and difference equations F Signals are generated and processed in this domain. F Implementation of filters take place in this domain I ˆ !-domain or frequency domain F The domain of the frequency responses & spectrum representation F Physical significant when analyzing sound, but seldom used for implementation (in HW). I z -domain F The domain of z -transforms, operators, poles & zeros. F Exists primary for its convinience in mathenatical analysis & synthesis AA, IN3190/4190 (Ifi/UiO) Lecture, week 03 Sept. 2019 4 / 36

Lecture, week 03 The z-transformation — Part I · Lecture, week 03 The z-transformation — Part I Week 03, INF3190/4190 Andreas Austeng Department of Informatics, University of

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Lecture, week 03The z-transformation — Part I

Week 03, INF3190/4190

Andreas Austeng

Department of Informatics, University of Oslo

September 2019

AA, IN3190/4190 (Ifi/UiO) Lecture, week 03 Sept. 2019 1 / 36

Outline

Outline1 Motivation

z-domain: One of three domains to studyTransfer function (or system function)

2 The z-transformDefinition of the z-transformRational functionsRegion of convergence (ROC)Table of z-transform pairsQuiz

3 The Inverse z-transformApproachesPartial fraction expansion

4 Properties of the z-transform]Properties

AA, IN3190/4190 (Ifi/UiO) Lecture, week 03 Sept. 2019 2 / 36

Motivation

Outline1 Motivation

z-domain: One of three domains to studyTransfer function (or system function)

2 The z-transformDefinition of the z-transformRational functionsRegion of convergence (ROC)Table of z-transform pairsQuiz

3 The Inverse z-transformApproachesPartial fraction expansion

4 Properties of the z-transform]Properties

AA, IN3190/4190 (Ifi/UiO) Lecture, week 03 Sept. 2019 3 / 36

Motivation z-domain: One of three domains to study

3 domains

We can analyze digital signals and systems in three differentdomains:

I n-domain or time domainF The domain of sequences, impulse responses and difference

equationsF Signals are generated and processed in this domain.F Implementation of filters take place in this domain

I !̂-domain or frequency domainF The domain of the frequency responses & spectrum representationF Physical significant when analyzing sound, but seldom used for

implementation (in HW).I z-domain

F The domain of z-transforms, operators, poles & zeros.F Exists primary for its convinience in mathenatical analysis & synthesis

AA, IN3190/4190 (Ifi/UiO) Lecture, week 03 Sept. 2019 4 / 36

Motivation z-domain: One of three domains to study

Why bother with an other domain???

Difficult analysis in one domain may be easier in one other!More domains will result in increased understanding (???)Examples:Cascade combination of LTI-systems:

I In n-domain, this introduced the "new" (and less familiar) techniqueof convolution.

I In z-domain, a cascade combination is performed with polynomialmultiplication.

Stability:I In n-domain: BIBO.I In z-domain, Unit circle within ROC.

Causality:I In n-domain: Only use current or previous samplesI In z-domain, All poles are within the ROC.

AA, IN3190/4190 (Ifi/UiO) Lecture, week 03 Sept. 2019 5 / 36

Motivation z-domain: One of three domains to study

10/26/2007 © 2003, JH McClellan & RW Schafer 5

THREE DOMAINS

al ,bk{ }

Z-TRANSFORM-DOMAIN: poles & zerosPOLYNOMIALS: H(z)

Use H(z) to getFreq. Response

z = e j ˆ ω H(z) =

bkz−k∑

1− alz−l∑

FREQ-DOMAIN

l

ll

ω

ω

ω

ˆ

1

ˆ

1)(

jN

kjM

kk

j

ea

ebeH

=

=

−=

TIME-DOMAIN

∑∑==

−+−=M

kk

Nknxbnyany

01][][][

ll l

AA, IN3190/4190 (Ifi/UiO) Lecture, week 03 Sept. 2019 6 / 36

Motivation z-domain: One of three domains to study

Three domains of FIR and IIR filters

FIR-filtersI n-domain: y [n] =

PM

k=0 h[k ]x [n � k ] =PM

k=0 bk x [n � k ]I z-domain: H(z) =

PM

k=0 h[k ]z�k =PM

k=0 bk z�k

I !̂-domain: H(e|!k ) = H(!) =PM

k=0 h[k ]e�|!k =PM

k=0 bk e�|!k

IIR-filters: y [n] = �P

N

k=1 aky [n � k ] +P

M

k=0 bkx [n � k ]I Simple example; y [n] = a1y [n � 1] + b0y [n]

F By assuming initial rest, i.e. y [n] = 0 8 n < 0F Use that h[n] is given as response of �[n] ... we get (next slide)F h[n] = b0(a1)

nu[n],

F H(z) =P1

n=0 h[n]z�n = b01�a1z�1 , |a1| < 1

I IIR part is difficult! Could use linearity of the z-transform;Y (z) = a1z�nY (z) + b0X (z) and H(z) = Y (z)

X(z) =b0

1�a1z�1 , |a1| < 1

AA, IN3190/4190 (Ifi/UiO) Lecture, week 03 Sept. 2019 7 / 36

Motivation z-domain: One of three domains to study

10/26/2007 © 2003, JH McClellan & RW Schafer 17

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

IMPULSE RESPONSE

u[n] =1, for n ≥ 0

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

][)(][ 10 nuabnh n=

AA, IN3190/4190 (Ifi/UiO) Lecture, week 03 Sept. 2019 8 / 36

Motivation Transfer function (or system function)

Transfer/system function

From last week:I An arbitary sequence can be written: x [n] =

P1k=�1 x [k ]�[n � k ].

I ) LTI-system: y [n] =P1

k=�1 x [k ]h[n � k ] =P1

k=�1 h[k ]x [n � k ].I The impulse response h[n] completely specifies the LTI system!

) In general, any sequence change shape through a LTI system.But: Does a sequences exist that retains its shape?

Yes, sequences being eigenfunctions does!

Lets consider the sequence: x [n] = zn, 8n, z = <(z) + |=(z).

AA, IN3190/4190 (Ifi/UiO) Lecture, week 03 Sept. 2019 9 / 36

Motivation Transfer function (or system function)

Transfer/system function, ... continuesLet x [n] = zn, 8n.

y [n] =P1

k=0 h[k ]x [n � k ] =P1

k=0 h[k ]zn�k =⇣P1

k=0 h[k ]z�k

⌘zn.

Define: H(z) , P1k=0 h[k ]z�k .

Then the output sequence becomes: y [n] = H(z)zn, 8n.I.e. Output sequence is the same as the input sequence,multiplied by a constant H(z).We say that the complex exponential sequences areeigenfunctions to LTI systems, with H(z) being the eigen value.Then, due to linearity:

I If input to LTI can be expressed as: x [n] =P

kck zn

k,

I then output of LTI would be: y [n] =P

kck H(zk )zn

k, 8n.

I Note: If H(zk ) = 0 for some zk , the LTI system would not let thecorresponding complex exponential zk through!

AA, IN3190/4190 (Ifi/UiO) Lecture, week 03 Sept. 2019 10 / 36

The z-transform

Outline1 Motivation

z-domain: One of three domains to studyTransfer function (or system function)

2 The z-transformDefinition of the z-transformRational functionsRegion of convergence (ROC)Table of z-transform pairsQuiz

3 The Inverse z-transformApproachesPartial fraction expansion

4 Properties of the z-transform]Properties

AA, IN3190/4190 (Ifi/UiO) Lecture, week 03 Sept. 2019 11 / 36

The z-transform Definition of the z-transform

Definition of the z-transform

X (z) ⌘ Z{x [n]} =P1

n=�1 x [n]z�n,where z = re|!̂ is a complex variable.Infinite power series;

I it exists only for those values of z for which this serie converges) Region Of Convergence (ROC);

I the set of values for which X (z) attain a finite value.

Notation:x [n]

z ! X (z)

AA, IN3190/4190 (Ifi/UiO) Lecture, week 03 Sept. 2019 12 / 36

The z-transform Definition of the z-transform

Definition of the z-transform ...

The z-transform is a complexvariable. It is convenient to describe itusing the complex z-plane.z = Re(z) + |Im(z) = re|!̂

The z-transform evaluated on the unitcircle corresponds to the DTFT:( ... Chapter 4 ... )

X (e|!̂) = X (z)|z=e|!̂

If the DTFT exist, the unit circle lieswithin the ROC

AA, IN3190/4190 (Ifi/UiO) Lecture, week 03 Sept. 2019 13 / 36

The z-transform Definition of the z-transform

Some elementary sequencesDelta function / impuls:

X (z) =P1

n=�1 �[n]z�n = z0 = 1, ROC: All z

Firkantpuls:

X (z) =P

M

n=0 z�n = 1�z�(M+1)

1�z�1 1, ROC: |z| > 1

Exponential, finit length:

X (z) =P1

n=0 anz�n =P1

n=0(az�1)n

= 1�aM+1z�(M+1)

1�az�1 , ROC: |z| > |a|

AA, IN3190/4190 (Ifi/UiO) Lecture, week 03 Sept. 2019 14 / 36

The z-transform Definition of the z-transform

Drill problem1 Let x [n] = (0.5)nu[n]. Find its z-transformation X (z) (and ROC).2 Let y [n] = (�0.5)nu[n]. Find Y (z) (and ROC).3 Let g[n] = �(0.5)nu[�n � 1]. Find G(z) (and ROC).

% S c r i p t som p l o t t e r X( z ) , Y( z ) og G( z )

% Se t te r opp akser og et " meshgrid "ax = �10:1/100:10; ay = �10:1/100:10;[xs ,ys ] = meshgrid (ax ,ay ) ;

% Finner verd ien t i l z , dvs z = R* exp ( j *Omega) , Omega \ i n [�\p i . . \ p i )z = s q r t (xs . ^2 + ys . ^ 2 ) . * exp (j* atan2 (ys ,xs ) ) ;

%% X( z )X = z . / ( z�0.5) ;X (xs . ^2 + ys . ^2 <= 0 . 5 . ^ 2 ) = NaN;

f i g u r e ( 1 ) ; meshz (ax ,ay , abs (X ) ) ; x l a b e l ( 'Re( z ) ' ) ; y l a b e l ( ' Im ( z ) ' ) ;%%zlim ( [ 0 5 ] ) ; cax is ( [ 0 5 ] )

%% Y( z )Y = z . / ( z+0.5) ;Y (xs . ^2 + ys . ^2 <= 0 . 5 . ^ 2 ) = NaN;

f i g u r e ( 2 ) ; mesh(ax ,ay , abs (Y ) ) ; x l a b e l ( 'Re( z ) ' ) ; y l a b e l ( ' Im ( z ) ' ) ;%%zlim ( [ 0 5 ] ) ; cax is ( [ 0 5 ] )

%% G( z )G = z . / (z� 0 .5 ) ;G (xs . ^2 + ys . ^2 >= 0 . 5 . ^ 2 ) = NaN;f i g u r e ( 3 ) ; meshz (ax ,ay , abs (G ) ) ; x l a b e l ( 'Re( z ) ' ) ; y l a b e l ( ' Im ( z ) ' ) ;

%%ax is([�1 1 �1 1 0 5 ] ) ; cax is ( [ 0 5 ] )

AA, IN3190/4190 (Ifi/UiO) Lecture, week 03 Sept. 2019 15 / 36

The z-transform Definition of the z-transform

ExampleTwo-sided exponential sequence

x [n] =

(an, n � 0�bn, n < 0

X (z) = �P�1

n=�1 bnz�n +P1

n=0 anz�n.

AA, IN3190/4190 (Ifi/UiO) Lecture, week 03 Sept. 2019 16 / 36

The z-transform Rational functions

The z-transform of rational functions

Many signals in digital signal processing have z-transform that arerational functions of z:

X (z) = A(z)B(z) =

PM

k=0 bk z�k

PN

l=0 al z�k

= b0z�M

a0z�N ⇥ zM+(b1/b0)z

M�1+···+bM/b0zN+(a1/a0)zN�1+···+aN/a0

= b0z�M

a0z�N ⇥ (z�z1)(z�z2)···(z�zM )(z�p1)(z�p2)···(z�pN )

= b0a0

zN�M ⇧M

k=1(z�zk )⇧N

k=1(z�pk )

I Roots of the numerator polynomial, zk , are referred to as zeros ofX (z).

I Roots of the denominator polynomial, pk , are referred to as poles ofX (z).

I Poles and zeros uniquely defines that functional form of a rationalz-transform to within a constant.

AA, IN3190/4190 (Ifi/UiO) Lecture, week 03 Sept. 2019 17 / 36

The z-transform Rational functions

Rational z-transforms ...

X (z) = b0a0

zN�M ⇧M

k=1(z�zk )

⇧N

k=1(z�pk )

M finite zeros at z = z1, z2, . . . , zM .N finite poles at z = p1, p2, . . . , pM .|N �M| zeros (if N > M) or poles (if N < M) at origin z = 0.Poles or zeros may occur at z =1. A zero exists at z =1 ifX (1) = 0 and a pole exists at z =1 if X (1) =1.If we counts the poles at zero and infinity, we find that X (z) hasexactly the same number of poles as zeros.ROC can not contain any poles.If all zeros/poles known; can determine X (z) to within a scalingfactor (b0

a0).

AA, IN3190/4190 (Ifi/UiO) Lecture, week 03 Sept. 2019 18 / 36

The z-transform Region of convergence (ROC)

ROC

The ROC is, in general, an annulus of the form↵ < |z| < �.

I If ↵ = 0, ROC may also include the point z = 0.I If � = 0, ROC may also include the point z =1.

For a rational X (z), ROC will contain no poles.Finite-duration signals

I Causal: Entire z-plane except z = 0.I Anti-causal: Entire z-plane except z =1.I Two-sided: Entire z-plane except z = 0 and z =1.

Infinite-duration signalsI Causal: |z| > r2I Anti-causal: |z| < r1I Two-sided: r2 < |z| < r1

AA, IN3190/4190 (Ifi/UiO) Lecture, week 03 Sept. 2019 19 / 36

The z-transform Table of z-transform pairs

AA, IN3190/4190 (Ifi/UiO) Lecture, week 03 Sept. 2019 20 / 36

The z-transform Quiz

Quiz

1 La x [n] = (�2)nu[n]. ROC til X (z) er da(a) |z| > 2, (b) |z| < 2, (c) |z| > 1/2, (d) |z| < 2, (e) |z| > 0.

2 Hvilket type system beskriver H[z] = z2+2z+1

z?

(a) Kausalt, (b) HP, (c) FIR, (d) Rekursivt, (e) Lineær fase.3 Et kausalt filter har poler z = 0.3, �0.5, 0.7.

Hva er ROC og er systemet stabilt?(a) |z| > 0.7 og stb, (b) |z| > 0.7 og ustb,(c) |z| > 0.3 og stb, (d) |z| > 0.3 og ustb.

4 Hva er impulsresponsen h[n] til systemet H(z) = z�1z+1 , |z| > 1?

5 La y [n] + 0.5y [n � 1] = 2x [n � 1].Finn transferfunksjonen HI(z) til det inverse systemet.

AA, IN3190/4190 (Ifi/UiO) Lecture, week 03 Sept. 2019 21 / 36

The Inverse z-transform

Outline1 Motivation

z-domain: One of three domains to studyTransfer function (or system function)

2 The z-transformDefinition of the z-transformRational functionsRegion of convergence (ROC)Table of z-transform pairsQuiz

3 The Inverse z-transformApproachesPartial fraction expansion

4 Properties of the z-transform]Properties

AA, IN3190/4190 (Ifi/UiO) Lecture, week 03 Sept. 2019 22 / 36

The Inverse z-transform Approaches

The Inverse z-transform

Three possible approachesContour integral: x [n] ⌘ Z�1{X (z)} = 1

2⇡j

Hc

X (z)zn�1dz.Power series: The z-transform is a power series expansionX (z) =

P1n=�1 x [n]z�n = . . . x [�1]z + x [0] + x [1]z�1 . . ..

I Then we can read x [n] directly!

Partial fraction expansionFor z-transforms that are rational functions of z:

X (z) =P

M

k=0 bk z�k

1+P

N

k=1 ak z�k,

where a0 = 1.I Turn it into a sum of simple parts and invert each part.

AA, IN3190/4190 (Ifi/UiO) Lecture, week 03 Sept. 2019 23 / 36

The Inverse z-transform Partial fraction expansion

Partial fraction expansion

X (z) =P

M

k=0 bk z�k

1+P

N

k=1 ak z�k, where a0 = 1.

Proper if aN 6= 0 and M < N.Proper and distinct poles:X(z)

z= A1

z�p1+ A2

z�p2+ · · ·+ AN

z�pN

I Ak = (z�pk )X(z)z

���z=pk

, k = 1, 2, . . .N

I x [n] =PN

k=1 Ak (pk )nu[n]

AA, IN3190/4190 (Ifi/UiO) Lecture, week 03 Sept. 2019 24 / 36

The Inverse z-transform Partial fraction expansion

10/26/2007 © 2003, JH McClellan & RW Schafer 37

GENERAL INVERSE Z

(pole)n

AA, IN3190/4190 (Ifi/UiO) Lecture, week 03 Sept. 2019 25 / 36

The Inverse z-transform Partial fraction expansion

Ekample (Manolakis 3.8)Real and distinct poles

Consider x [n] with z-transform X (z) = 1+z�1

(1�z�1)(1�0.5z�1).

X (z) is proper and rational, with poles p1 = 1 and p2 = 0.5 )X (z) = 1+z�1

(1�z�1)(1�0.5z�1)= A1

1�z�1 + A21�0.5z�1

To find A1, multiply with (1� z�1) and set z = p1 = 1.) A1 = 4

To find A2, multiply with (1� 0.5z�1) and set z = p2 = 2.) A2 = �3) X (z) = 4

1�z�1 � 31�0.5z�1

AA, IN3190/4190 (Ifi/UiO) Lecture, week 03 Sept. 2019 26 / 36

The Inverse z-transform Partial fraction expansion

Ekample (Manolakis 3.8) continues ...Real and distinct poles

To find sequence x [n], we need the ROCI If ROC: |z| < .5, both sequences are anti-causal and

x [n] = �4u[�n � 1] + 3( 12 )

nu[�n � 1].I If ROC: |z| > 1, both sequences are causal and

x [n] = 4u[n]� 3( 12 )

nu[n].I If ROC: 0.5 < |z| < 1, x [n] becomes two-sided:

x [n] = �4u[�n � 1]� 3( 12 )

nu[n].

AA, IN3190/4190 (Ifi/UiO) Lecture, week 03 Sept. 2019 27 / 36

The Inverse z-transform Partial fraction expansion

10/26/2007 © 2003, JH McClellan & RW Schafer 36

CALCULATE the RESPONSE

H(z)

Use the Z-Transform MethodAnd PARTIAL FRACTIONS

AA, IN3190/4190 (Ifi/UiO) Lecture, week 03 Sept. 2019 28 / 36

The Inverse z-transform Partial fraction expansion

10/26/2007 © 2003, JH McClellan & RW Schafer 38

SPLIT Y(z) to INVERT

� Need SUM of Terms:

AA, IN3190/4190 (Ifi/UiO) Lecture, week 03 Sept. 2019 29 / 36

The Inverse z-transform Partial fraction expansion

10/26/2007 © 2003, JH McClellan & RW Schafer 39

INVERT Y(z) to y[n]

� Use the Z-Transform Table

AA, IN3190/4190 (Ifi/UiO) Lecture, week 03 Sept. 2019 30 / 36

The Inverse z-transform Partial fraction expansion

10/26/2007 © 2003, JH McClellan & RW Schafer 40

TWO PARTS of y[n]

�� TRANSIENTTRANSIENT� Acts Like (pole)n

� Dies out ?� IF |a1|<1

b0a1

a1 −e j ˆ ω 0

⎛ ⎝ ⎜

⎞ ⎠ ⎟ a1nu[n]

b0

1− a1e− j ˆ ω 0

⎛ ⎝ ⎜

⎞ ⎠ ⎟ e j ˆ ω 0n u[n]

�� STEADYSTEADY--STATESTATE� Depends on the input� e.g., Sinusoidal

AA, IN3190/4190 (Ifi/UiO) Lecture, week 03 Sept. 2019 31 / 36

The Inverse z-transform Partial fraction expansion

10/26/2007 © 2003, JH McClellan & RW Schafer 41

STEADY STATE HAPPENS

� When Transient dies out� Limit as “n” approaches infinity� Use Frequency Response to get

Magnitude & Phase for sinusoid

yss[n]→ b0

1 −a1e−j ˆ ω 0

⎛ ⎝ ⎜

⎞ ⎠ ⎟ e j ˆ ω 0n = H(e j ˆ ω 0 )e j ˆ ω 0n

AA, IN3190/4190 (Ifi/UiO) Lecture, week 03 Sept. 2019 32 / 36

Properties of the z-transform

Outline1 Motivation

z-domain: One of three domains to studyTransfer function (or system function)

2 The z-transformDefinition of the z-transformRational functionsRegion of convergence (ROC)Table of z-transform pairsQuiz

3 The Inverse z-transformApproachesPartial fraction expansion

4 Properties of the z-transform]Properties

AA, IN3190/4190 (Ifi/UiO) Lecture, week 03 Sept. 2019 33 / 36

Properties of the z-transform Properties

Properties of the z-transform

Linearity:Z{a1x1[n] + a2x2[n]} = a1X1(z) + a2X2(z);ROC: at least ROCx1 \ ROCx2.Time sample shifting:Z{x [n � n0]} = z�n0X (z);ROC = ROCx , with the possible exception of adding or deletingthe points z = 0 and z =1.Frequency shifting:Z{anx [n]} = X ( z

a);

ROC = ROCx scaled by |a|.

AA, IN3190/4190 (Ifi/UiO) Lecture, week 03 Sept. 2019 34 / 36

Properties of the z-transform Properties

Properties of the z-transform ...

Time reversal:If Z{x [n]} = X (z); ROC : r1 < |z| < r2,then Z{x [�n]} = X (z�1);ROC : 1/r2 < |z| < 1/r1.Differentiation in the z-domain:Z{nx [n]} = �z

dX(z)dz

;ROC = ROCx .Convolution of two sequences:Z{x1[n] ⇤ x2[n]} = X1(z)X2(z);ROC : ROCx1 \ ROCx2.ROC may be larger if there is a pole-zero cancellation in theproduct X1(z)X2(z).

AA, IN3190/4190 (Ifi/UiO) Lecture, week 03 Sept. 2019 35 / 36

Properties of the z-transform Properties

Properties of the z-transform ....

Complex conjugation:Z{x⇤[n]} = X ⇤(z⇤);ROC = ROCx .The initial value theorem:If x [n] causal, then x [0] = limz!1 X (z).

AA, IN3190/4190 (Ifi/UiO) Lecture, week 03 Sept. 2019 36 / 36