digital signal processing_ lecuter-3_ z transform

47
1 Digital Signal Processing Lecture-2 Spring 2010 Z Transform Chap.-3 Hassan Bhatti Hassan Bhatti, DSP, Spring 2011

Upload: subcampus

Post on 27-Nov-2014

209 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Digital Signal Processing_ Lecuter-3_ Z Transform

1

Digital Signal Processing Lecture-2 Spring 2010Z Transform Chap.-3

Hassan Bhatti

Hassan Bhatti, DSP, Spring 2011

Page 2: Digital Signal Processing_ Lecuter-3_ Z Transform

2

z-Transform

The z-transform is the most general concept for the transformation of discrete-time series.

The Laplace transform is the more general concept for the transformation of continuous time processes.

For example, the Laplace transform allows you to transform a differential equation, and its corresponding initial and boundary value problems, into a space in which the equation can be solved by ordinary algebra.

The switching of spaces to transform calculus problems into algebraic operations on transforms is called operational calculus. The Laplace and z transforms are the most important methods for this purpose.

Hassan Bhatti, DSP, Spring 2010

Page 3: Digital Signal Processing_ Lecuter-3_ Z Transform

3

The Transforms

The Laplace transform of a function f(t):

0

)()( dtetfsF st

The one-sided z-transform of a function x(n):

0

)()(n

nznxzX

The two-sided z-transform of a function x(n):

n

nznxzX )()(

Hassan Bhatti, DSP, Spring 2010

Page 4: Digital Signal Processing_ Lecuter-3_ Z Transform

4

Relationship to Fourier Transform

Note that expressing the complex variable z in polar form reveals the relationship to the Fourier transform:

n

nii

n

nini

n

n

ii

enxXeX

rifandernxreX

orrenxreX

)()()(

,1,)()(

,))(()(

which is the Fourier transform of x(n).

Hassan Bhatti, DSP, Spring 2010

Page 5: Digital Signal Processing_ Lecuter-3_ Z Transform

5

Relation ship of Transformations

Hassan Bhatti, DSP, Spring 2010

Page 6: Digital Signal Processing_ Lecuter-3_ Z Transform

6

Region of Convergence

The z-transform of x(n) can be viewed as the Fourier transform of x(n) multiplied by an exponential sequence r-n, and the z-transform may converge even when the Fourier transform does not.

By redefining convergence, it is possible that the Fourier transform may converge when the z-transform does not.

For the Fourier transform to converge, the sequence must have finite energy, or:

n

nrnx )(

Hassan Bhatti, DSP, Spring 2010

Page 7: Digital Signal Processing_ Lecuter-3_ Z Transform

7

Convergence, continued

n

nznxzX )()(

The power series for the z-transform is called a Laurent series:

The Laurent series, and therefore the z-transform, represents an analytic function at every point inside the region of convergence, and therefore the z-transform and all its derivatives must be continuous functions of z inside the region of convergence.

In general, the Laurent series will converge in an annular region of the z-plane.

Hassan Bhatti, DSP, Spring 2010

Page 8: Digital Signal Processing_ Lecuter-3_ Z Transform

8

Some Special Functions

First we introduce the Dirac delta function (or unit sample function):

0,1

0,0)(

n

nn

This allows an arbitrary sequence x(n) or continuous-time function f(t) to be expressed as:

dttxxftf

knkxnxk

)()()(

)()()(

or

0,1

0,0)(

t

tt

Hassan Bhatti, DSP, Spring 2010

Page 9: Digital Signal Processing_ Lecuter-3_ Z Transform

9

Convolution, Unit Step

These are referred to as discrete-time or continuous-time convolution, and are denoted by:

)(*)()(

)(*)()(

ttftf

nnxnx

We also introduce the unit step function:

0,0

0,1)(or

0,0

0,1)(

t

ttu

n

nnu

Note also:

k

knu )()(

Hassan Bhatti, DSP, Spring 2010

Page 10: Digital Signal Processing_ Lecuter-3_ Z Transform

10

Poles and Zeros

When X(z) is a rational function, i.e., a ration of polynomials in z, then:

1. The roots of the numerator polynomial are referred to as the zeros of X(z), and

2. The roots of the denominator polynomial are referred to as the poles of X(z).

Note that no poles of X(z) can occur within the region of convergence since the z-transform does not converge at a pole.

Furthermore, the region of convergence is bounded by poles.

Hassan Bhatti, DSP, Spring 2010

Page 11: Digital Signal Processing_ Lecuter-3_ Z Transform

11

Example

)()( nuanx n

The z-transform is given by:

0

1)()()(n

n

n

nn azznuazX

Which converges to:

azforazz

azzX

11

1)(

Clearly, X(z) has a zero at z = 0 and a pole at z = a.

a

Region of convergence

Hassan Bhatti, DSP, Spring 2010

Page 12: Digital Signal Processing_ Lecuter-3_ Z Transform

12

Convergence of Finite Sequences

Suppose that only a finite number of sequence values are nonzero, so that:

2

1

)()(n

nn

nznxzX

Where n1 and n2 are finite integers. Convergence requires

.)( 21 nnnfornx

So that finite-length sequences have a region of convergence that is at least 0 < |z| < , and may include either z = 0 or z = .

Hassan Bhatti, DSP, Spring 2010

Page 13: Digital Signal Processing_ Lecuter-3_ Z Transform

13

Z-Transform of sin/cos

ikeu(k) 1-i ze-11

U(z)

2ee

)cos(ku(k)ikik

Time Domain Z-Transform

2iee

)sin(ku(k)ikik

-ikeu(k)1-i- ze-1

1U(z)

21

1

2121

1

1111

1i1-i

zz2cos1zcos1

)z(sin)zcos(1zcos1

)/2zisinzcos1

1zisinzcos1

1(

)/2ze1

1ze-1

1(U(z)

21-

-1

zz2cos-1zsin

U(z)

Hassan Bhatti, DSP, Spring 2010

Page 14: Digital Signal Processing_ Lecuter-3_ Z Transform

14

Exponentially Modulated sin/cos

2)(ae)(ae

)cos(ka(k)ukiki

kexpcos

2i)(ae)(ae

)sin(ka(k)ukiki

kexpsin

221-

-1

zazcos2a-1zsina

U(z)

0 2 4 6 8 10 12 14 16 18-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

u(k)=c os(k*pi/6)*0.9k

221-

-1

zazcos2a-1zsina

U(z)

A damped oscillating signal – a typical output of a second order system

Hassan Bhatti, DSP, Spring 2010

Page 15: Digital Signal Processing_ Lecuter-3_ Z Transform

15

Inverse z-Transform

The inverse z-transform can be derived by using Cauchy’s integral theorem. Start with the z-transform

n

nznxzX )()(

Multiply both sides by zk-1 and integrate with a contour integral for which the contour of integration encloses the origin and lies entirely within the region of convergence of X(z):

transform.-z inverse the is)()(21

21

)(

)(21

)(21

1

1

11

nxdzzzXi

dzzi

nx

dzznxi

dzzzXi

C

k

n C

kn

C n

kn

C

k

Hassan Bhatti, DSP, Spring 2010

Page 16: Digital Signal Processing_ Lecuter-3_ Z Transform

16

Z-Transform/Inverse Z-Transform

LTI: yimpuse(k)=0.3k-1u (k)=0.7k y (k)?

0 5 10 150

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

*(convolution)

10.7z11

Z

=

·(multiplication)

= )0.7z)(10.3z(1z

11

1

0 5 10 150

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Z-1

1

-1

0.3z1z

Z

Transfer Function

0 2 4 6 8 10 12 14 16 180

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Hassan Bhatti, DSP, Spring 2010

Page 17: Digital Signal Processing_ Lecuter-3_ Z Transform

17

Inverse Z-Transform

Table Lookup – if the Z-Transform looks familiar, look it up in the Z-Transform table!

Long Division Partial Fraction Expansion

u(k) U(z)ZZ-1?

(k)2u(k)3uu(k) rampstep

(z)2U(z)3U

)z(12z

z13

U(z)

rampstep

21

1

1

Z-1?

Hassan Bhatti, DSP, Spring 2010

Page 18: Digital Signal Processing_ Lecuter-3_ Z Transform

18

Long Division

Sort both nominator and denominator with descending order of z first

21

1

z2z1z3

U(z)

u(0)=3, u(1)=5, u(2)=7, u(3)=9, …, guess: u(k)=3ustep(k)+2uramp(k)

Hassan Bhatti, DSP, Spring 2010

Page 19: Digital Signal Processing_ Lecuter-3_ Z Transform

19

Partial Fraction Expansion

Many Z-transforms of interest can be expressed as division of polynomials of z

m

0j

jj

n

0i

ii

zb

zaU(z)

May be trickier:complex rootduplicate root

)p)...(zp)(zp(zb

zb...zbzbb

m21m

mm

2210

m

1j j

j0 pz

ccU(z)

,1kjdexpp p(k)u

j

m

1jdexppimpulse0 (k)u(k)ucu(k)

j

where k>0

1j

1

zp11

z

Hassan Bhatti, DSP, Spring 2010

Page 20: Digital Signal Processing_ Lecuter-3_ Z Transform

20

Real Unique Poles

Hassan Bhatti, DSP, Spring 2010

Page 21: Digital Signal Processing_ Lecuter-3_ Z Transform

21

Repeat Real Poles(1)

Hassan Bhatti, DSP, Spring 2010

Page 22: Digital Signal Processing_ Lecuter-3_ Z Transform

22

Repeat Real Poles(2)

Hassan Bhatti, DSP, Spring 2010

Page 23: Digital Signal Processing_ Lecuter-3_ Z Transform

23

Complex Poles(1)

Hassan Bhatti, DSP, Spring 2010

Page 24: Digital Signal Processing_ Lecuter-3_ Z Transform

24

Complex Poles(2)

Hassan Bhatti, DSP, Spring 2010

Page 25: Digital Signal Processing_ Lecuter-3_ Z Transform

25

An Example

86zz1414z3z

U(z) 2

2

4z

c2z

ccU(z) 21

0

0k,4c2c

0k,cu(k) 1k

21k

1

0

(z-2)(z-4)

U1(z)=c0 Z-1 u1(k)=c0*uimpulse(k)

Z-1

Z-1 u2(k)=c1*2k-1, k>02z

c(z)U 1

2

4zc

(z)U 23

u2(k)=c2*4k-1, k>0

c0? c1? c2?

Hassan Bhatti, DSP, Spring 2010

Page 26: Digital Signal Processing_ Lecuter-3_ Z Transform

26

Get The Constants!

86zz1414z3z

U(z) 2

2

4z

c2z

ccU(z) 21

0

(z-2)(z-4)

,4z

c2z

ccU(z) 21

0

,z ,cU(z) 0 3

86zz1414z3z

limc 2

2

z0

,c2z4)(zc

4)c(z4)U(z)-(zK(z) 21

0

3|2z

1414z3zcK(4) 4z

2

2

Hassan Bhatti, DSP, Spring 2010

Page 27: Digital Signal Processing_ Lecuter-3_ Z Transform

27

Partial Fraction Expansion – cont’d

U(z)limcz0

m

0j

jj

n

0i

ii

zb

zaU(z)

m

1j j

j0 pz

ccU(z)

How to get c0 and cj’s ?

)U(z)p-(z(z)U jp j

)(pUc jpj j

define

Hassan Bhatti, DSP, Spring 2010

Page 28: Digital Signal Processing_ Lecuter-3_ Z Transform

28

An Example – Complete Solution

386zz1414z3z

limU(z)limc 2

2

zz0

4-z1414z3z

86zz1414z3z

2)(z(z)U

2

2

2

2

2-z1414z3z

86zz1414z3z

4)(z(z)U

2

2

2

4

86zz1414z3z

U(z) 2

2

4z

c2z

ccU(z) 21

0

14-2

1421423(2)Uc

2

21

32-4

1441443(4)Uc

2

42

4z3

2z1

3U(z)

0k,432

0k3,u(k) 1k1k

Hassan Bhatti, DSP, Spring 2010

Page 29: Digital Signal Processing_ Lecuter-3_ Z Transform

29

Solving Difference Equations

m)u(kb...1)u(kbn)y(ka...1)y(kay(k) m1n1

U(z)zb...U(z)zbY(z)za...Y(z)zaY(z) mm

11

nn

11

U(z)za...za1

zb...zbY(z) n

n1

1

mm

11

...y(k)

Z

Z-1Transfer Function

Hassan Bhatti, DSP, Spring 2010

Page 30: Digital Signal Processing_ Lecuter-3_ Z Transform

30

A Difference Equation Example

Exponentially Weighted Moving Average

y(k)=cy(k-1)+(1-c)u(k-1)

Hassan Bhatti, DSP, Spring 2010

Page 31: Digital Signal Processing_ Lecuter-3_ Z Transform

31

Solve it!

1

1

1

1

1-1-

-1

1

1

0.8z11.2z

0.4z10.6z

0.8z1.2

0.4z0.6

0.8)0.4)(z(z0.6z

)0.8z-)(10.4z-(10.6z

U(z)0.4z1

0.6zY(z)

LTI: y(k)=0.4y(k-1)+0.6u(k-1)u (k)=0.8k y (k)?

U(z)0.6zY(z)0.4zY(z) 11 Z

10.8z11

U(z) Z

1-k1k 0.81.20.4-0.6y(k)

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

0

0.2

0.4

0.6

0.8

1

-1 0 1 2 3 4 5 6 7 8 90

0.2

0.4

0.6

0.8

1

Hassan Bhatti, DSP, Spring 2010

Page 32: Digital Signal Processing_ Lecuter-3_ Z Transform

32

Properties

z-transforms are linear:

The transform of a shifted sequence:

Multiplication:

But multiplication will affect the region of convergence and all the pole-zero locations will be scaled by a factor of a.

)()()()( zbYzaXnbynax Z

)()( 00 zXznnx nZ

)()( 1zaZnxan Z

Hassan Bhatti, DSP, Spring 2010

Page 33: Digital Signal Processing_ Lecuter-3_ Z Transform

33

Convolution of Sequences

both. of econvergenc of regions the inside of values for)()()(

)()()(

let

)()(

)()()(

Then

)()()(

zzYzXzW

zzmykxzW

knm

zknykx

zknykxzW

knykxnw

k

k m

m

n

k n

n

n k

k

Hassan Bhatti, DSP, Spring 2010

Page 34: Digital Signal Processing_ Lecuter-3_ Z Transform

34

More Definitions

Definition. Periodic. A sequence x(n) is periodic with period if and only if x(n) = x(n + ) for all n.

Definition. Shift invariant or time-invariant. Consider a sequence y(n) as the result of a transformation T of x(n). Another interpretation is that T is a system that responds to an input or stimulus x(n): y(n) = T[x(n)].

The transformation T is said to be shift-invariant or time-invariant if:

y(n) = T [x(n)] implies that y(n - k) = T [x(n – k)]

For all k. “Shift invariant” is the same thing as “time invariant” when n is time (t).

Hassan Bhatti, DSP, Spring 2010

Page 35: Digital Signal Processing_ Lecuter-3_ Z Transform

35

k

k

k

kk

k

nhnxknhkxny

T

nhkxny

knTkxknkxTny

kn

knnh

).(*)()()()(

then , transform the of invariance time have weIf

).()()(

)()()()()(

:Then . at occurring

shock or spike"" a ),( to system the of response the be )( Let

This implies that the system can be completely characterized by its impulse response h(n). This obviously hinges on the stationarity of the series.

Hassan Bhatti, DSP, Spring 2010

Page 36: Digital Signal Processing_ Lecuter-3_ Z Transform

36

Definition. Stable System. A system is stable if

k

kh )(

Which means that a bounded input will not yield an unbounded output.

Definition. Causal System. A causal system is one in which changes in output do not precede changes in input. In other words,

. for)()( then

for)()( If

021

021

nnnxTnxT

nnnxnx

Linear, shift-invariant systems are causal iff h(n) = 0 for n < 0.

Hassan Bhatti, DSP, Spring 2010

Page 37: Digital Signal Processing_ Lecuter-3_ Z Transform

37

.)()(

that so )()(Let

)()()(

Then. for )( let

is, That .sinusoidal be)( let)()()( Given

)(

nii

k

kii

k

kini

k

kni

ni

k

k

eeHny

ekheH

ekheekhny

nenx

nxnhkxny

Here H(ei) is called the frequency response of the system whose impulse response is h(n). Note that H(ei) is the Fourier transform of h(n).

Hassan Bhatti, DSP, Spring 2010

Page 38: Digital Signal Processing_ Lecuter-3_ Z Transform

38

We can generalize this state that:

. of function continuous a touniformly converges

and convergent absolutely is transform the then,)(

)(21

)(

)()(

n

nii

n

nii

nxIf

deeXnx

enxeX

This implies that the frequency response of a stable system always converges, and the Fourier transform exists.

These are the Fourier transform pair.

Hassan Bhatti, DSP, Spring 2010

Page 39: Digital Signal Processing_ Lecuter-3_ Z Transform

39

deekTxT

tx

ekTxeX

deeTXtx

deiXtx

TTiX

TeX

tiT

T k

Tkicc

k

Tkic

Ti

tiTiT

T

c

tiT

T

cc

cTi

)(2

)(

have we,)()( Since

.)(21

)(

:Combining

.)(21

)(

:transform Fourier time continuous the From

),(1

)(

Hassan Bhatti, DSP, Spring 2010

Page 40: Digital Signal Processing_ Lecuter-3_ Z Transform

40

Z Transformation Pairs

Hassan Bhatti, DSP, Spring 2010

Page 41: Digital Signal Processing_ Lecuter-3_ Z Transform

41

Z Transformation Pairs

Hassan Bhatti, DSP, Spring 2010

Page 42: Digital Signal Processing_ Lecuter-3_ Z Transform

42

Properties of Z Transform, Linearity

Hassan Bhatti, DSP, Spring 2010

Page 43: Digital Signal Processing_ Lecuter-3_ Z Transform

43

Time Shifting

Hassan Bhatti, DSP, Spring 2010

Page 44: Digital Signal Processing_ Lecuter-3_ Z Transform

44

Multiplication by Exponential Sequence

Hassan Bhatti, DSP, Spring 2010

Page 45: Digital Signal Processing_ Lecuter-3_ Z Transform

45

Time Reversal

Hassan Bhatti, DSP, Spring 2010

Page 46: Digital Signal Processing_ Lecuter-3_ Z Transform

46

Convolution of Sequences

Hassan Bhatti, DSP, Spring 2010

Page 47: Digital Signal Processing_ Lecuter-3_ Z Transform

47

Properties of Z Transformation

Hassan Bhatti, DSP, Spring 2010