35
Professor A G Constantinides© 1 AGC DSP Interpolation & Interpolation & Decimation Decimation Sampling period T , at the output Interpolation by m: Let the OUTPUT be [i.e. Samples exist at all instants nT] then INPUT is [i.e. Samples exist at instants mT] INPUT OUTPUT T j e z ) ( z Y ) ( m z X

1 Interpolation Decimation

Embed Size (px)

Citation preview

Page 1: 1 Interpolation Decimation

Professor A G

Constantinides© 1

AGC

DSP

AGC

DSP

Interpolation & Decimation Interpolation & Decimation

Sampling period T , at the output

Interpolation by m: Let the OUTPUT be [i.e. Samples

exist at all instants nT] then INPUT is [i.e. Samples

exist at instants mT]

INPUT OUTPUT

Tjez

)(zY

)( mzX

Page 2: 1 Interpolation Decimation

Professor A G

Constantinides© 2

AGC

DSP

AGC

DSP

Interpolation & Decimation Interpolation & Decimation Let Digital Filter transfer function be

then Hence is of the form i.e.

its impulse response exists at the instants mT.

Write

(.)H

(.)).()( HzXzY m(.)H )(zH

)1(21 ).1(...).2()1(.)0()( mzmhzhhzhzH)12()1( ).12(...).1().( mmm zmhzmhzmh

)13()12(2 )13(...).12().2( mmm zmhzmhzmh

Page 3: 1 Interpolation Decimation

Professor A G

Constantinides© 3

AGC

DSP

AGC

DSP

Interpolation & Decimation Interpolation & Decimation Or Where

So that

...)()()()( 32

21

1 mmm zHzzHzzHzH

...).2().()0()( 21 mmm zmhzmhhzH

...).12().1()1()( 22 mmm zmhzmhhzH

...).22().2()2()( 23 mmm zmhzmhhzH

)().()().()( 21

1mmmm zXzHzzXzHzY

...)().(32 mm zXzHz

Page 4: 1 Interpolation Decimation

Professor A G

Constantinides© 4

AGC

DSP

AGC

DSP

Interpolation & Decimation Interpolation & Decimation Hence the structure may be realised as

Samples across here are phased

by T secs. i.e. they do not interact in the adder.

Can be replaced by a commutator switch.

)(1mzH

)(2mzH

)(3mzH

INPUT+ OUTPUT

Page 5: 1 Interpolation Decimation

Professor A G

Constantinides© 5

AGC

DSP

AGC

DSP

Interpolation & Decimation Interpolation & Decimation

HenceINPUT

Commutator

OUTPUT

)(1mzH

)(2mzH

)(3mzH

Page 6: 1 Interpolation Decimation

Professor A G

Constantinides© 6

AGC

DSP

AGC

DSP

Interpolation & Decimation Interpolation & Decimation Decimation by m: Let Input be (i.e. Samples exist

at all instants nT) Let Output be (i.e. Samples exist

at instants mT) With digital filter transfer function

we have

)(zX

)( mzY

)(zH

)().()( zHzXzY m

Page 7: 1 Interpolation Decimation

Professor A G

Constantinides© 7

AGC

DSP

AGC

DSP

Interpolation & Decimation Interpolation & Decimation Set

And

Then

...)()()()( 32

21

1 mmm zHzzHzzHzH

)(.... )1( mm

m zHz

...)()()()( 32

21

1 mmm zXzzXzzXzX

)(... )1( mm

m zXz

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

11

mm

mmmm zHzzHzzHzY

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

11

mm

mmm zXzzXzzX

Page 8: 1 Interpolation Decimation

Professor A G

Constantinides© 8

AGC

DSP

AGC

DSP

Interpolation & Decimation Interpolation & Decimation Any products that have powers of

less than m do not contribute to , as this is required to be a function of .

Therefore we retain the products

1z)( mzY

mz

)()( 11mm zXzH )()( 2

mmm

m zXzHz )...()( 31

mmm

m zXzHz

)()(... 2m

mmm zXzHz

Page 9: 1 Interpolation Decimation

Professor A G

Constantinides© 9

AGC

DSP

AGC

DSP

Interpolation & Decimation Interpolation & Decimation The structure realising this is

+INPUT OUTPUT

Commutator

)(1mzH

)( mm zH

)(1m

m zH

)(2mzH

Page 10: 1 Interpolation Decimation

Professor A G

Constantinides© 10

AGC

DSP

AGC

DSP

Interpolation & Decimation Interpolation & Decimation For FIR filters why Downsample and

then Upsample?

#MULT/ACC N f s.LENGTH N

LOW PASSf s f s

LENGTH N

LOW PASS

LENGTH N

LOW PASS

DOWNSAMPLE M:1 UPSAMPLE 1:M

f s f sMfs

#MULT/ACC N f

Ms.

#MULT/ACC N f

Ms.

TOTAL #MULT/ACC 2. .N f

Ms

 

Page 11: 1 Interpolation Decimation

Professor A G

Constantinides© 11

AGC

DSP

AGC

DSP

Interpolation & Decimation Interpolation & Decimation

A very useful FIR transfer function special case is for : N odd, symmetricwith additional constraints on to be zero at alternate sampling points other than at zero time index.

 

)(nh )(nh

Page 12: 1 Interpolation Decimation

Professor A G

Constantinides© 12

AGC

DSP

AGC

DSP

Interpolation & Decimation Interpolation & Decimation For this impulse response

The amplitude response is then given

In general

 

97531 ).5().4().3().2().1()0()( zhzhzhzhzhhzH9753 ).5().4().3().2().1( zhzhzhzhzh

)3cos(2).2()cos(2).1()0()( ThThhA )5cos(2).3( Th

odd )cos(.

21

2)0()(r

Trr

hhA

Page 13: 1 Interpolation Decimation

Professor A G

Constantinides© 13

AGC

DSP

AGC

DSP

Interpolation & Decimation Interpolation & Decimation Now consider Then

 

21 ,T 21

odd 1 )cos(.

21

2)0()(r

Trr

hhA

odd 12 cos.

21

2)0()(r

TT

rr

hhA

odd 1 )cos(.

21

)0(r

Trr

hh

Page 14: 1 Interpolation Decimation

Professor A G

Constantinides© 14

AGC

DSP

AGC

DSP

Interpolation & Decimation Interpolation & Decimation Hence Also

Or

For a normalised response

 

)0(2)()( 21 hAA

odd .

2.cos.

21

2)0(2 r

TT

rr

hhT

A

)0(h

T

AAA2

2)()( 21

1)0(A

T

A

Page 15: 1 Interpolation Decimation

Professor A G

Constantinides© 15

AGC

DSP

AGC

DSP

Interpolation & Decimation Interpolation & Decimation Thus

The shifted response

is useful

 

11)0(2 h

21

)0( h

21

)()(~ AA

Page 16: 1 Interpolation Decimation

Professor A G

Constantinides© 16

AGC

DSP

AGC

DSP

Design of Decimator and Design of Decimator and InterpolatorInterpolator

Example Develop the specifications for the design of a decimator to reduce the sampling rate of a signal from 12 kHz to 400 Hz

The desired down-sampling factor is therefore M = 30 as shown below

Page 17: 1 Interpolation Decimation

Professor A G

Constantinides© 17

AGC

DSP

AGC

DSP

Multistage Design of Multistage Design of Decimator and InterpolatorDecimator and Interpolator

Specifications for the decimation filter H(z) are assumed to be as follows:

Hz180pF Hz200sF0020.p 0010.s

Page 18: 1 Interpolation Decimation

Professor A G

Constantinides© 18

AGC

DSP

AGC

DSP

Polyphase DecompositionPolyphase DecompositionThe Decomposition Consider an arbitrary sequence {x[n]}

with a z-transform X(z) given by

Write X(z) as

nnznxzX ][)(

10

Mk

Mk

k zXzzX )()(

nn

nn

kk zkMnxznxzX ][][)(

10 Mk

Page 19: 1 Interpolation Decimation

Professor A G

Constantinides© 19

AGC

DSP

AGC

DSP

Polyphase DecompositionPolyphase Decomposition The subsequences are

called the polyphase components of the parent sequence {x[n]}

The functions , given by the z-transforms of , are called the polyphase components of X(z)

]}[{ nxk

]}[{ nxk

)(zX k

Page 20: 1 Interpolation Decimation

Professor A G

Constantinides© 20

AGC

DSP

AGC

DSP

Polyphase DecompositionPolyphase Decomposition The relation between the subsequences

and the original sequence {x[n]} are given by

In matrix form we can write

]}[{ nxk

10 MkkMnxnxk ],[][

)(

)(

)(

....)( )(

MM

M

M

M

zX

zX

zX

zzzX

1

1

0

111 ....

Page 21: 1 Interpolation Decimation

Professor A G

Constantinides© 21

AGC

DSP

AGC

DSP

Polyphase DecompositionPolyphase Decomposition A multirate structural interpretation of

the polyphase decomposition is given below

Page 22: 1 Interpolation Decimation

Professor A G

Constantinides© 22

AGC

DSP

AGC

DSP

Polyphase DecompositionPolyphase Decomposition

The polyphase decomposition of an FIR transfer function can be carried out by inspection

For example, consider a length-9 FIR transfer function:

8

0n

nznhzH ][)(

Page 23: 1 Interpolation Decimation

Professor A G

Constantinides© 23

AGC

DSP

AGC

DSP

Polyphase DecompositionPolyphase Decomposition Its 4-branch polyphase decomposition is

given by

where

)()()()()( 43

342

241

140 zEzzEzzEzzEzH

210 840 zhzhhzE ][][][)(

11 51 zhhzE ][][)(

12 62 zhhzE ][][)(

13 73 zhhzE ][][)(

Page 24: 1 Interpolation Decimation

Professor A G

Constantinides© 24

AGC

DSP

AGC

DSP

Polyphase DecompositionPolyphase Decomposition The polyphase decomposition of an IIR

transfer function H(z) = P(z)/D(z) is not that straightforward

One way to arrive at an M-branch polyphase decomposition of H(z) is to express it in the form by multiplying P(z) and D(z) with an appropriately chosen polynomial and then apply an M-branch polyphase decomposition to

)('/)(' MzDzP

)(' zP

Page 25: 1 Interpolation Decimation

Professor A G

Constantinides© 25

AGC

DSP

AGC

DSP

Polyphase DecompositionPolyphase Decomposition Example - Consider

To obtain a 2-band polyphase decomposition we rewrite H(z) as

Therefore,

where

1

1

31

21

z

zzH )(

2

1

2

2

2

21

11

11

91

5

91

61

91

651

)31)(31(

)31)(21()(

z

z

z

z

z

zz

zz

zzzH

)()()( 21

120 zEzzEzH

11

1

91

5191

610

zz

z zEzE )(,)(

Page 26: 1 Interpolation Decimation

Professor A G

Constantinides© 26

AGC

DSP

AGC

DSP

Polyphase DecompositionPolyphase Decomposition The above approach increases the

overall order and complexity of H(z) However, when used in certain

multirate structures, the approach may result in a more computationally efficient structure

An alternative more attractive approach is discussed in the following example

Page 27: 1 Interpolation Decimation

Professor A G

Constantinides© 27

AGC

DSP

AGC

DSP

Polyphase DecompositionPolyphase Decomposition Example - Consider the transfer function

of a 5-th order Butterworth lowpass filter with a 3-dB cutoff frequency at 0.5:

We can show that H(z) can be expressed as

40557281.02633436854.01

5)11(0527864.0)(

zz

zzH

2

2

2

2

5278601

5278601

10557301

105573021

z

z

z

z zzH.

.

.

.)(

Page 28: 1 Interpolation Decimation

Professor A G

Constantinides© 28

AGC

DSP

AGC

DSP

Polyphase DecompositionPolyphase Decomposition Therefore H(z) can be expressed as

where

1

1

5278601

52786021

1 z

zzE.

.)(

1

1

10557301

105573021

0 z

zzE.

.)(

)()()( 21

120 zEzzEzH

Page 29: 1 Interpolation Decimation

Professor A G

Constantinides© 29

AGC

DSP

AGC

DSP

Polyphase DecompositionPolyphase Decomposition

In the above polyphase decomposition, branch transfer functions are stable allpass functions (proposed by Constantinides)

(More on this later) Moreover, the decomposition has not

increased the order of the overall transfer function H(z)

)(zEi

Page 30: 1 Interpolation Decimation

Professor A G

Constantinides© 30

AGC

DSP

AGC

DSP

FIR Filter Structures Based FIR Filter Structures Based on Polyphase Decompositionon Polyphase Decomposition

We demonstrate that a parallel realization of an FIR transfer function H(z) based on the polyphase decomposition can often result in computationally efficient multirate structures

Consider the M-branch Type I polyphase decomposition of H(z): )()( 1

0M

kMk

k zEzzH

Page 31: 1 Interpolation Decimation

Professor A G

Constantinides© 31

AGC

DSP

AGC

DSP

FIR Filter Structures Based FIR Filter Structures Based on Polyphase Decompositionon Polyphase Decomposition

A direct realization of H(z) based on the Type I polyphase decomposition is shown below

Page 32: 1 Interpolation Decimation

Professor A G

Constantinides© 32

AGC

DSP

AGC

DSP

FIR Filter Structures Based FIR Filter Structures Based on Polyphase Decompositionon Polyphase Decomposition

The transpose of the Type I polyphase FIR filter structure is indicated below

Page 33: 1 Interpolation Decimation

Professor A G

Constantinides© 33

AGC

DSP

AGC

DSP

IIR Filters Structures Based IIR Filters Structures Based on Polyphase Formon Polyphase Form

Consider the two-phase system below (proposed by Constantinides)

(You’ll see these structures again later on when we are dealing with Wavelets)

)(1 zH

)(2 zH

Page 34: 1 Interpolation Decimation

Professor A G

Constantinides© 34

AGC

DSP

AGC

DSP

IIR Filters Structures Based IIR Filters Structures Based on Polyphase Formon Polyphase Form

Where

Then the overall transfer function (+ sign) is

)(11 )( jezH

)(22 )( jezH

)(2)(121 )()()( jj eezHzHzG

)2/)]()(cos([)( 212/)](2)(1[ jezG

Page 35: 1 Interpolation Decimation

Professor A G

Constantinides© 35

AGC

DSP

AGC

DSP

IIR Filters Structures Based IIR Filters Structures Based on Polyphase Formon Polyphase Form

Efficient computation is achieved when

These forms correspond to the half-band filters mentioned earlier

The concept can be generalised in a polyphased form

Reconstruction?

)()( 211 zFzH

)()( 22

12 zFzzH