Multistage Implementation

23
Multistage Implementation Problem : There are cases in which the filter requirements call for a digital filter of high complexity, in terms of number of stages. Example : a signal has a bandwidth of 450Hz and it is sampled at 96kHz. We want to resample it at 1kHz: 48 F kHz 050 . 0 45 . 96 09 96 . 01 96 . 96 xn () ym () F kH z x 96 F kHz y 1 ( ) F kHz |()| XF 0 45 . |()| H () Hz

description

96. Multistage Implementation Problem : There are cases in which the filter requirements call for a digital filter of high complexity, in terms of number of stages. Example : a signal has a bandwidth of 450Hz and it is sampled at 96kHz. We want to resample it at 1kHz:. - PowerPoint PPT Presentation

Transcript of Multistage Implementation

Page 1: Multistage Implementation

Multistage ImplementationProblem: There are cases in which the filter requirements call for a digital filter of high complexity, in terms of number of stages. Example: a signal has a bandwidth of 450Hz and it is sampled at 96kHz. We want to resample it at 1kHz:

48 F kHz0 50.0 45.

96

0 996.

0196.

96x n( ) y m( )

F kHzx 96 F kHzy 1

( )F kHz

| ( ) |X F

0 45.

| ( ) |H

( )H z

Page 2: Multistage Implementation

Solution: for an FIR filter designed by the window method, the order of the filter is determined by the size of the transition region. With a Hamming Window the order is determined by the equation

8 01

96M.

which yieldsDisdvantage: a lot of computations at a high freq. rate

M 960 8 7 680,

7 680 96 000 0 74 109, , . / sec multiplies

Page 3: Multistage Implementation

Multistage Implementation: we decimate the signal in several stages.

D1H1 D2H2 DLHL

F Fx 1F2

FFDy

x

D D D DL 1 2

x n( )F3

( )y m

FL

DLPFx n( ) y m( )

xF xy

FF

D

One Stage Implementation: we decimate in one shot.

Page 4: Multistage Implementation

See the last stage first:

DLHL

x nL ( ) y m( )FL FFD

FDy

L

L

x

( )LH

F

pLD

Passband:

pF / 2yF

0 pF

Stopband: , since/ 2 / 2y LF F 22 2

yL

L L L

FFF FD F D

This filter clears everything above ./ 2yF

Page 5: Multistage Implementation

Problem: we can design the low pass filters in a clever way, by taking into consideration that the spectrum is bandlimited.

Hi( )X

DiHiFi F

FDi

i

i 1

[ ]ix n 1[ ]ix m

Fi

2Fi1Fi1

22yF

2yF

pass stop

aliased

Fi1

22yF F

F

iD

( )iX 1( )iX

Page 6: Multistage Implementation

Problem: we can design the low pass filters in a clever way, by taking into consideration that the spectrum is bandlimited.

Hi( )X

DiHiFi F

FDi

i

i 1

x ni ( ) x mi1( )

Hi

FFi

21 2y

i

FF Fp

Specs for :• pass: • stop:

( )iH 0 Fp

1 2 2i y iF F F

Page 7: Multistage Implementation

Example: same problem we saw before:Use Multistage.

8H1 6H2 2H3x n( ) y m( )

F kHz1 96 F kHz2 12 F kHz3 2 F kHz4 1

0 45. 115. 0 45. 15. 0 45. 050. F0 9

96. 23

96 0 9

12. 3

12 0 9

2.

2

22 1

96. 2 1

12. 01

2.

order M35 46 160

Pass Band [0, 450] HzStop Band > 500 HzSampling Freq. 96 kHz

mult./sec34 106. 0 5 106. 0 3 106.

kHz

rad

rad

Page 8: Multistage Implementation

Efficient Multirate Implementation

Goal: we want to determine an efficient implementation of a multirate system. For example in Decimation and Interpolation:

)(zH D)(nx )(my)(ns

you have to compute only, ie. one every D samples.

)(mDs

)(zH)(my

)(msI

)(nx

most of the values of s(mD) are zero

Page 9: Multistage Implementation

Noble Identities:

D )(zG)(nx )(my

D)( DzG)(nx )(my

)()()( Dxmgmy

k Dk

D kxkmDgmy )()()( if 0

)()()( DxDmDgmy D

)(2 ng

1

1n m

)(mg

)()2(2 mgmg

)(zG)( 2zG

Page 10: Multistage Implementation

For example take an FIR Filter

z D

z D

Dx n( ) y m( )

z 1

z 1

Dx n( ) y m( )

h( )0

h( )1

h( )2

h( )0

h( )1

h( )2

since

z D D z 1D

Page 11: Multistage Implementation

Similarly:

M)(zG)(nx )(my

M )( MzG)(nx )(my

k Mm

M kxkMmgmy )()()( if 0

otherwise 0

if )()()( k

Mmkxkgmy

otherwise 0

if )()()(

MmkxMkgmy

M

)(2 ng

1

1n m

)(mg

)()2(2 mgmg

)(zG)( 2zG

Page 12: Multistage Implementation

z 1

z 1

Mx n( ) y m( )

h( )0

h( )1

h( )2

since

z 1 Mz MM

z M

z M

Mx n( ) y m( )

h( )2

h( )0

h( )1

Page 13: Multistage Implementation

Application: POLYPHASE Filters

Decimator: take, for example, D=2 2H z( )x n( ) y m( )

H z h n z h m z z h m zn

n

m

m

m

m( ) ( ) ( ) ( ) 2 2 12 1 2

H z H z z H ze o( ) ( ) ( ) 2 1 2

even odd

Page 14: Multistage Implementation

Therefore this system becomes:

H ze ( )2

H zo ( )2

z 1

2y m( )

2x n( )

y m( )H ze ( )2

H zo ( )2

z 1

2

H ze ( )

H zo ( )z 1

2y m( )

2x n( )

x n( )

Filtering at High Sampling Rate

Filtering at Low Sampling rate

Page 15: Multistage Implementation

Similarly:

2 H z( )x n( ) y m( )

y m( )

x n( )

( )oH z

( )eH z

z 1

2

2( )oH z

2( )eH z

z 1

2

2

x n( )

y m( )

Filtering at High Sampling Rate

Filtering at Low Sampling Rate

Page 16: Multistage Implementation

Example: Consider the Filter/Decimator structure shown below, with

)(zH 2)(nx )(my)(ns

8765

4321

2.16.05.10.2

40.25.16.02.1)(

zzzz

zzzzzH

This can be written as

)(

6421

)(

8642

2

2

6.00.20.26.0

2.15.145.12.1)(

zH

zH

o

e

zzzz

zzzzzH

and implemented in Polyphase form:

z 1

2y m( )

2x n( )

4321 2.15.145.12.1 zzzz

321 6.020.26.0 zzz

Page 17: Multistage Implementation

1

0

[ ] [ ]N

n Nk

n k

H z h n z z h kN z

Given any integer N:

NN

NNN zHzzHzzHzH 1)1(

11

0 ...)( NH z

Example: take N=3

7654321 7.02.04.16.02.43.5.1.2)( zzzzzzzzH

6330 2.02.41.2)( zzzH

6331 7.06.05.)( zzzH

332 4.13.)( zzH

General Polyphase Decomposition

Page 18: Multistage Implementation

N][nx zH ][my

POLYPHASE

][nx 0

NH z

1NH z

1z][my

N

1z 2

NH z

1N

NH z

1z

Apply to Downsampling…

Page 19: Multistage Implementation

][nx 0H z

1H z1z

][my

N

1z 2H z

1NH z

1z

N

N

N

… apply Noble Identity

Page 20: Multistage Implementation

][nx1z

N1z

N

N

][nx S/P

N ][0 mx

1[ ]Nx m

0n0m

0[ ] [ ]x m x mN

1[ ] [ 1]x m x mN

1[ ] [( 1) 1]Nx m x m N

n N

1 2 3 4 5

1

26

3

4

5

6

Serial to Parallel (Buffer):

Serial to Parallel (Buffer)

Page 21: Multistage Implementation

N][nx zH ][my

][nx NzH0

NzH1

1z

N ][my

POLYPHASE

NN zH 1

1z

Same for Upsampling…

Page 22: Multistage Implementation

N][nx zH ][my

][nx zH0

zH1

1z

][my

NOBLE IDENTITY

zH N 1

1z

N

N

N

… apply Noble Identity

Page 23: Multistage Implementation

1z

N [ ]y m

N

][0 ny

1[ ]Ny n

This is a Parallel to Serial (an Unbuffer):

[ ]y mP/S

N

0[ ]y n

1[ ]Ny n

0n

1

2

3

4

5

6

0m m N

1 2 3 4 5 6

1n

Parallel to Serial (Unbuffer or Interlacer)