34
Signal Processing in the Discrete Time Domain Microprocessor Applications (MEE4033) Sogang University Department of Mechanical Engineering

Signal Processing in the Discrete Time Domain Microprocessor Applications (MEE4033) Sogang University Department of Mechanical Engineering

Embed Size (px)

Citation preview

Page 1: Signal Processing in the Discrete Time Domain Microprocessor Applications (MEE4033) Sogang University Department of Mechanical Engineering

Signal Processing in the Discrete Time Domain

Microprocessor Applications (MEE4033)

Sogang UniversityDepartment of Mechanical Engineering

Page 2: Signal Processing in the Discrete Time Domain Microprocessor Applications (MEE4033) Sogang University Department of Mechanical Engineering

Definition of the z-Transform

Page 3: Signal Processing in the Discrete Time Domain Microprocessor Applications (MEE4033) Sogang University Department of Mechanical Engineering

Overview on Transforms

• The Laplace transform of a function f(t):

0)()( dtetfsF st

• The z-transform of a function x(k):

0

)()(n

kzkxzX

0

)()(k

kTiTi ekxeX

• The Fourier-series of a function x(k):

Page 4: Signal Processing in the Discrete Time Domain Microprocessor Applications (MEE4033) Sogang University Department of Mechanical Engineering

Example 1: a right sided sequence

1 2 3 4 5 6 7 8 9 10-1-2-3-4-5-6-7-8k

x(k)

. . .

kakx )( 0kfor , is

az

z

azazza

zkxzX

k

k

k

kk

k

k

10

1

0 1

1)(

)()(

For a signal )(zX

Page 5: Signal Processing in the Discrete Time Domain Microprocessor Applications (MEE4033) Sogang University Department of Mechanical Engineering

Example 2: a lowpass filter

)()1()( kbrkayky Suppose a lowpass filter law is

where1ba

0 0

1

0 0

)1(1

0 00

)()(

)()1(

)()1()(

k k

kk

k k

kk

k k

kk

k

k

zkbrzkyaz

zkbrzkyaz

zkbrzkayzky

1/3

Page 6: Signal Processing in the Discrete Time Domain Microprocessor Applications (MEE4033) Sogang University Department of Mechanical Engineering

Example 2: a lowpass filter

0 0

1

0

)()()(k k

kk

k

k zkbrzkyazzky

2/3

Rearranging the equation above,

00

1 )()()1(k

k

k

k zkrbzkyaz

)()1(

)()( zRaz

zazR

az

bzzY

Signals

Transfer function

Page 7: Signal Processing in the Discrete Time Domain Microprocessor Applications (MEE4033) Sogang University Department of Mechanical Engineering

Example 2: a lowpass filter

3/3

Signals

Transfer function

The block-diagram representation:

)(kr )(kyaz

za

)1(

Page 8: Signal Processing in the Discrete Time Domain Microprocessor Applications (MEE4033) Sogang University Department of Mechanical Engineering

Example 3: a highpass filter

)()()( kykrkh A highpass filter follows:

where)()1()1()( krakayky

1/2

)()1(

)()1(

)(

)()()(

zRaz

za

zRaz

zazR

zYzRzH

Transfer function

Page 9: Signal Processing in the Discrete Time Domain Microprocessor Applications (MEE4033) Sogang University Department of Mechanical Engineering

z-Transform Pairs

Discrete-time domain signal z-domain signal

otherwise 0,

0for,1)(

kk 1

mz

11

1 z

11

1 az

1/2

otherwise 0,

for,1)(

mkmk

otherwise 0,

0for,1)(

kku

0for, ka k

Page 10: Signal Processing in the Discrete Time Domain Microprocessor Applications (MEE4033) Sogang University Department of Mechanical Engineering

z-Transform Pairs

2210

10

]cos2[1

]sin[

zrzr

zr

2210

10

]cos2[1

]cos[1

zrzr

zr

210

10

]cos2[1

][sin

zz

z

0for),cos( 0 kk 210

10

]cos2[1

][cos1

zz

z

2/2

Discrete-time domain signal z-domain signal

0for),sin( 0 kk

0for),cos( 0 kkr k

0for),sin( 0 kkr k

Page 11: Signal Processing in the Discrete Time Domain Microprocessor Applications (MEE4033) Sogang University Department of Mechanical Engineering

Example 4: a decaying signal

Suppose a signal is for . Find .kky 9.0)(

1

0

1

0

9.01

1

)9.0(9.0)()(

z

zzzkyzY kkkk

0k )(zY

19.01

1)(

zzYkky 9.0)( 0kfor

z-transform

Inversez-transform

Page 12: Signal Processing in the Discrete Time Domain Microprocessor Applications (MEE4033) Sogang University Department of Mechanical Engineering

Example 5: a signal in z-domain

Suppose a signal is given in the z-domain:

25.0)(

2

z

zzY

221

1

5.0)5.0cos(5.021

)5.0sin(5.02)(

zz

zzY

)5.0sin()5.0(2)( kky k 0kfor

z-transform

Inversez-transform

From the z-transform table,

25.0)(

2

z

zzY

The signal is equivalent to

Page 13: Signal Processing in the Discrete Time Domain Microprocessor Applications (MEE4033) Sogang University Department of Mechanical Engineering

Properties of the z-Transform

Page 14: Signal Processing in the Discrete Time Domain Microprocessor Applications (MEE4033) Sogang University Department of Mechanical Engineering

Linearity of z-Transform

)()]([ zXkx Z

)()]([ zYky Z

)()()]()([ zbYzaXkbykax Z

where a and b are any scalars.

Page 15: Signal Processing in the Discrete Time Domain Microprocessor Applications (MEE4033) Sogang University Department of Mechanical Engineering

Example 6: a signal in z-domain

Suppose a signal is given in the z-domain:

25.0)(

2

2

z

zzY

11 5.01

5.0

5.01

5.0)(

zz

zY

kkky )5.0(5.0)5.0(5.0)(

0kfor

z-transform

Inversez-transform

Since the z-transform is a linear map,

11 5.01

5.0

5.01

5.0)(

zz

zY

Arranging the right hand side,

Page 16: Signal Processing in the Discrete Time Domain Microprocessor Applications (MEE4033) Sogang University Department of Mechanical Engineering

Shift

)()]([ zXkx Z

)()]([ zXzmkx mZ

Page 17: Signal Processing in the Discrete Time Domain Microprocessor Applications (MEE4033) Sogang University Department of Mechanical Engineering

Example 7: arbitrary signals

z-transform

Inversez-transform

Any signals can be represented in the z-domain:

1 2 3 4 5 6 7 8 9 10-1-2-3-4k

y(k)5

55)( 0 zzY

z-transform

Inversez-transform

1 2 3 4 5 6 7 8 9 10-1-2-3-4k

y(k)3

321 213)( zzzzY2

1

Page 18: Signal Processing in the Discrete Time Domain Microprocessor Applications (MEE4033) Sogang University Department of Mechanical Engineering

Discrete-Time Approximation

Backward approximation

)( kTty )(1 1

zYT

z

Forward approximation

)( kTty )(1

zYT

z

Trapezoid approximation

)( kTty )(1

12zY

z

z

T

Page 19: Signal Processing in the Discrete Time Domain Microprocessor Applications (MEE4033) Sogang University Department of Mechanical Engineering

Multiplication by an Exponential Sequence

)()]([ zXkx Z

)()]([ 1zaXkxa k Z

Page 20: Signal Processing in the Discrete Time Domain Microprocessor Applications (MEE4033) Sogang University Department of Mechanical Engineering

Initial Value Theorem

0for ,0)( nnx

)(lim)0( zXxz

Page 21: Signal Processing in the Discrete Time Domain Microprocessor Applications (MEE4033) Sogang University Department of Mechanical Engineering

Convolution of Sequences

)()]([ zXkx Z

)()]([ zYky Z

)()(

)()()]()([0

zYzX

iyikxkykxk

i

ZZ

1/2

Page 22: Signal Processing in the Discrete Time Domain Microprocessor Applications (MEE4033) Sogang University Department of Mechanical Engineering

0

)()()()(i

ikyixkykx

0 0

)()()]()([k

k

i

zikyixkykxZ

0 0

)()(i

k

k

zikyix

0 0

)()(i

k

k

i zkyzix

)()( zYzX

2/2

Convolution of Sequences

Proof:

Page 23: Signal Processing in the Discrete Time Domain Microprocessor Applications (MEE4033) Sogang University Department of Mechanical Engineering

z-Transform of Linear Systems

Page 24: Signal Processing in the Discrete Time Domain Microprocessor Applications (MEE4033) Sogang University Department of Mechanical Engineering

Linear Time-Invariant System

)(kx

)(zX

)(kg

)(zG

k

i

ixikgky0

)()()(

)()()( zXzGzY

Page 25: Signal Processing in the Discrete Time Domain Microprocessor Applications (MEE4033) Sogang University Department of Mechanical Engineering

Nth-Order Difference Equation

M

r

rr

N

i

ii zbzXzazY

00

)()(

M

rr

N

ii rkxbikya

00

)()(

N

i

ii

M

r

rr zazbzG

00)(

z-Transform

Page 26: Signal Processing in the Discrete Time Domain Microprocessor Applications (MEE4033) Sogang University Department of Mechanical Engineering

Stable and Causal Systems

Re

Im

1

N

ii

M

rr

dz

czc

zG

1

10

)(

)(

)(

The system G(z) is stable if all the roots (i.e., di) of the denominator are in the unit circle of the complex plane.

Page 27: Signal Processing in the Discrete Time Domain Microprocessor Applications (MEE4033) Sogang University Department of Mechanical Engineering

Stable and Causal Systems

Re

Im

1

The system G(z) is causal if the number of poles is greater than that of zeros (i.e., M N).

N

ii

M

rr

dz

czc

zG

1

10

)(

)(

)(

Page 28: Signal Processing in the Discrete Time Domain Microprocessor Applications (MEE4033) Sogang University Department of Mechanical Engineering

Example 8: a non-causal filter

011

1

011

1

...

...

)(

)(

azazaz

bzbzbzb

zR

zYn

nn

mm

mm

Suppose a transfer function is given

By applying the inverse z-Transform

Therefore, the system is causal if

)()1(...)1()(

)()1(...)1()(

011

011

nkrbnkrbnmkrbnmkrb

nkyankyakyaky

mm

n

nm

Page 29: Signal Processing in the Discrete Time Domain Microprocessor Applications (MEE4033) Sogang University Department of Mechanical Engineering

Example 9: open-loop controller

ukyycym Suppose the dynamic equation of a system is

Approximating the dynamic equation byT

kykyy

)()1(

)()(112

2

2

zUzYkT

zc

T

zzm

The transfer function from U(z) to Y(z) is

012

2

)(

)(

azaz

b

zU

zY

1/2

Page 30: Signal Processing in the Discrete Time Domain Microprocessor Applications (MEE4033) Sogang University Department of Mechanical Engineering

Example 9: open-loop controller

A promising control algorithm is

2/2

012

2

azaz

b

)(zU )(zY

012

2

azaz

b

)(zU

)(zY2

012

b

azaz )(zR

However, the control algorithm is non-causal.

Page 31: Signal Processing in the Discrete Time Domain Microprocessor Applications (MEE4033) Sogang University Department of Mechanical Engineering

Frequency Response of H(z)

• The z-transform of a function x(k):

k

kzkxzX )()(

k

kTiTj ekxeX )()(

• The Fourier-transform of a function x(k):

(Recall: Similarity of the z-Transform and Fourier Transform)

• The frequency response is obtained by settingTjez

where T is the sampling period.

Page 32: Signal Processing in the Discrete Time Domain Microprocessor Applications (MEE4033) Sogang University Department of Mechanical Engineering

Example 10: frequency response of a low pass filter

Suppose a lowpass filter

1/2

)(1

)1()(

1zR

az

azY

By substituting for z,Tie

)(1

)1()( Ti

TiTi eR

ae

aeY

The magnitude is

)(1

)1()( Ti

TiTi eR

ae

aeY

Page 33: Signal Processing in the Discrete Time Domain Microprocessor Applications (MEE4033) Sogang University Department of Mechanical Engineering

2/2

Since ,

)(1

)1()( Ti

TiTi eR

ae

aeY

)sin()cos( TiTe Ti

)cos(21

1

)(sin))cos(1(

1

))sin()(cos(1

)1(

1

)1(

2

22

Taa

a

TTa

a

TiTa

a

ae

aTi

Example 10: frequency response of a low pass filter

Page 34: Signal Processing in the Discrete Time Domain Microprocessor Applications (MEE4033) Sogang University Department of Mechanical Engineering

IIR Filters and FIR Filters

An IIR (Infinite Impulse Response) filter is

)(

)(

)(

)(

i

i

pz

zzk

zR

zY

A FIR (Finite Impulse Response) filter is

)()(

)(izzk

zR

zY