Multirate DSP

Post on 07-Nov-2014

373 views 58 download

Tags:

Transcript of Multirate DSP

1

Applications of Multirate DSP to Software Radios

Jeffrey H. Reed

Bradley Dept. of Electrical and Computer Engineering

Virginia Tech

432 Durham Hall

reedjh@vt.edu

(540) 231-2972

2

What is a Multirate System?

Any system having more than one sample rate.

3

Overview (1)

• Applications of Multirate Signal Processing

• Principles of Decimation and Interpolation

• Simplification and Alternative Representations of Decimation and Interpolation Structures– Polyphase Filters– Sample Rate Conversion by Stages

4

Overview (2)

• Digital Filter Banks– Analysis– Synthesis

• CIC Filters

• Applications– Channelizer for Basestations– Synchronization and Carrier Recovery

5

Applications to Software Radios

Multirate systems have more than one sample rate

Key Advantage to the Approach is Cost:

• Price for high speed components goes up

exponentially with sample rate or clock

rate • Break the processing into parallel stages

operating at a lower rate.

6

Multirate DSP Applications to Software Radios

Decimation (reduction of sample rate)

useful for:–Increase effective resolution of A/D–Reduce data for processing–Create low computational count narrowband filters–Perform frequency translation–Divide a wide band into narrow indep. channels–Relax requirement on anti-aliasing filtering

7

Application of Interpolation

Interpolation (increase sample rate) useful for:

–Useful for effectively increasing resolution of

D/A

–Useful for pulse shaping filter

–Useful for combining several independent narrowband channels into one wideband data stream

8

Applications of Interpolation and Decimation

• Match system sample rates, e.g., connecting systems with different clock rates

• Synchronize symbol and code timing– Allow for sampling versus data rate

mismatch– Matched Filter is a multirate filter

• Conversion to and from TDM and FDM • Implementation of filter bank

channelizer for wideband transceivers in cellular base station

9

Other Applications

• Digital Filtering

• Spectral Analysis

• Speech Coding

• A/D and D/A Converters

10

Sample Rate Conversion

Sample Rate Converter

h(n,m)

x(n)

fx

y(m)

fy

Must be time varyingdepends on input and

output time

11

Sample Rate Conversion Notation

Ratio of sample rates can be expressed as the ratio of two relatively prime numbers (no common factors)

D

I

f

f

x

y I = interpolation factor (upsample factor, i.e., I = 2 doubles the sample rate)

D = decimation factor (downsample factor, i.e., D = 2 halves the sample rate

12

Why is Multirate Signal Processing Hard to Understand?

The Notation is Confusing!

Time and Frequency Variables Depend on the Context

13

Decimation by a Factor D

What process is needed if we wish to reduce its sample rate by D?

Let x(n) be a signal sampled at fx with spectrum is as below

|X()|

-2 - 0 2

A

14

Decimation by Factor D (contd.)

-4 -3 -2 -1 0 1 2 3 4 5 n

x(n)

T

x(n)

-4 -3 -2 -1 0 1 2 3 4 5 nT

y(m)

-2 - 1 0 1 2 m=n/D 2T

Assume x(n) is causal

Let downsample by D = 2

Contraction in time scale

Dx(n)

fx

y(m)fy= fx/DDownsampling

15

Decimation Requires Low Pass Filtering

HD()x(n) y(m)

Dv(m)

fx fx fy= fx/D

16

Decimation by a factor D (contd.)

|HD()|

/D/D

1Assuming HD() is ideal LPF

/D/D

|V()|=|HD()||X()|A

- y=D

|Y()|

-2 -2

D

A

/D 2/D-/D-2/D

Expansion in frequency scale

17

Analysis of DecimationIn Time Domain

k

D knxkhnv )()()(

)()( mDvmy

k

D kmDxkhmy )()()(

Combining the above two equations

Convolution:

Taking every Dth sample:

Now the sampling of v(n) can be expressed as

Output of decimator:

else

DDnnvnv

0

,...2,,0)()(~

18

Analysis of Decimation (contd.)

1

0

/21)( Where

)()()(~ D

k

DknjeD

np

npnvnv

In which can be thought of as v(n) sampled by an periodic impulse train p(n) with period D, i.e.,

)(~ nv

Using this relation the output of the decimator can be expressed as

)(~)()()()( mDvmDpmDvmDvmy

19

Analysis of Decimation (contd.)

/

/

1/2 /

0

2

( ) ( ) , 2 /

( ' )

( )

( ) [ ' ]

( ) ( )

1( )

1( )

y

y

y

y

y

y

j my y y

m

j m

m

j m

m

j m D

m

j m D

m

Dj m Dmk D

m k

j k

Y y m e f f

v m D e

v m D e

v m e m m D

v m p m e

v m e eD

v m eD

1

//

0

1

0

1 2

y

D mj DD

k m

Dy

k

e

kV

D D D

20

Analysis of Decimation (contd.)

Since ( ) ( ) ( ); ( ) can be expressed asy D y y yV H X Y

y=2f/fy=2(f/fx)D= xD

1

0

221)(

D

k

yyDy D

kX

D

kH

DY

So the spectrum of y(m) repeats itself at every 2/D radians

21

Analysis of Decimation (contd.)

The lowpass filter, HD () sufficiently reduces the spectral components above =/D, thereby acts as an anti-aliasing filter. In ideal case

else

H yyD

0

1)(

Thus all the images except the primary image (k=0 term) are removed and the Y() becomes

y

yy D

XD

Y ;1

)(

22

Summary of Decimation

Conceptually, the decimation process can be viewed as a mapping of a signal in frequency form 0x /D to 0y .

The low frequency contents of the signal are expanded in frequency. In time domain, this corresponds to a contraction of the signal i.e., removal of samples according to the decimation factor.

23

Interpolation by a factor I

Upsampling:

x(n) v(m) I

fxfy=Ifx

24

Interpolation: A Graphical View

Upsampling by I is the process of placing I-1 equally spaced zeros between each pair of samples of x(n)

x(n)

-1 0 1 2 3 n

v(m)

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

x(n) is a causal sequence

25

Interpolation: A Graphical View (2)

y(m)

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

The intermediate values corresponds to the hypothetical continuous signal

HI()x(n) y(m)

Iv(m)

fx fy =Ifx fy

26

Interpolation: A Graphical View (2) (contd.)

|X()|A

y/I-/I

|V(y)|A

2/I-2/I

|HI(y)|

/I-/I y

I

|Y(y)|

y-/I /I

Spectrum of x(n)

Assume HI() ideal LPF

Contraction in frequency scale

Spectrum of v(n)

27

Interpolation: Summary (1)The spectrum of the upsampled signal v(m) contains not only the primary band of interest, i.e., from - /I to /I but also its images centered around the integer multiples of 2 /I radians

This means that signal in the desired frequency range

maps to x0 Iy 0

where y = 2f / fy = 2f / (Ifx ) = x /I

28

Interpolation: Summary (2)

A compression in frequency of the primary image with respect to the original spectrum of x(n) corresponds to an expansion in the time scale of the signal.

The anti-imaging filter HI() (interpolation filter) recovers the primary band of interest.

else

II

H yyI

0

29

Interpolation by a factor of I

Thus the interpolation filter should eliminate the duplicate images. A gain of I is needed for interpolation as the spectrum of interpolated signal must have a scaling factor I time that of the original spectrum of x(n). As upsampling (inserting zero only) does not provide any gain so the interpolation filter must have a gain of I in the passband.

AnalysisTime domain:

else

IImI

mx

mv

0

,...2,,0)(Upsampling:

kI

kI

kIkkxkImh

kvkmhmy

]'[)()(

)'()'()('

Lowpass filtering:

30

Analysis of Interpolation (contd.)

In Z-Transform domain:

)(

]'[)(

)'()('

'

I

m

mI

m

m

zX

mImzmIv

zmvzV

The output Y(z) of the Interpolator:

LPFideal )( H)(

)()()(

I zzIX

zVzHzYI

I

DTFT:I

IXY yyy 0)()(

31

Analysis of Fractional Rate conversion

else

IImI

px

pv

0

2,,0)(

k

k

kxIkph

kvkphpw

)()(

)()()(

k

kxIkmDh

mDwmy

)()(

)()(

Upsampling by I:

Lowpass filtering by h(n):

Final output after downsampling:

In Time Domain:

In Frequency Domain

IIffff

IxH

vHW

xxpp

pp

ppp

//2/2 where

)(

DTFT of the intermediate signal w(p):

32

Analysis of Fractional rate conversion (contd.)

xxyy

D

k

yy

DIDIffff

D

kW

DY

)/()//(2/2 where

21 1

0

Downsampling of w(n) by D:

Otherwise

I

D

D

IX

D

IY yy

y

0

,min

Final output of the fractional rate converter:

else

DIIIX

W ppp

0

,min)()(

Using definition

of H():

33

Fractional Rate Conversion by I/DCascade interpolator and decimator.

The cascaded interpolation and decimation filter, i.e., HI() and HD() can be combined to form a single lowpass filter H() as below

Ix(n)

fx

v(p)fp= Ifx

HI()yI(p)

HD() Dw(p) y(m)

fp= Ifx fp= Ifx fy=(I/D)fx

else

DII

H

0

,min)(

34

Fractional Rate Conversion by I/D

•Interpolation precedes decimation as the spectrum of the intermediate signal yI(p) should, at least, contain all the components of the original spectrum.

•The composite filter H() has gain I as required due to interpolation by I and a cutoff

35

Multirate Identities•In conventional interpolation and decimation the filtering is done at the side where the signal is at a higher sampling rate.

•Reduced complexity be achieved if filtering can be done at lower sampling rate.

•Exchanging upsampler/downsampler and the anti-imaging/ antialiasing filter can reduce the sample rate.

36

Implementations of Decimator

Direct Form (Anti-aliasing filter + downsampling)

z-1

x(n)y(m)

Dh(0)

h(1)

z-1

h(2)

37

Efficient Form (Move the decimator through the summer)

z-1

x(n) h(0)

h(1)

z-1 h(2)

y(m)D

D

D

38

Implementation of Interpolator

Direct Form (upsampling + anti-imaging filter)

x(n)

z-1

y(m)h(0)

h(1)

z-1h(2)

I

39

Implementation of Interpolator (contd.)

Transposed form (reversed direction of flow, Time - Inverse Filter), swap output and input branches, nodes become adders and vice versa..

x(n)

z-1

y(m)h(0)

h(1)

z-1

h(2)

I

40

Efficient Form

x(n)

z-1

y(m)h(0)

h(1)

z-1h(2)

I

I

I

41

Multirate Identities

For Interpolation:

H(zI) I

=

x(n) y(m)

IH(z)y(m)x(n)

42

Multirate Identity for Interpolation

In time domain:

I

mm

k

k

mxmh

I

kkk

I

mxkh

I

kmx

I

kh

I

mh

I

mxmy

'

'

)'(*)'(

';)(

''

*)(

Which is the output of the right configuration. In Z-Transform domain:

Output of the left configuration:

)()(

)()()(II

I

zXzH

zXzHzY

By placing the filter before the upsampler, this identity enables the filter to operates at lower sampling rate. This results in a smaller number of filter coefficients.

43

Multirate Identities for Decimation

H(zD) D

=

D H(z)

x(n)

y(m)x(n)

y(m)

44

Multirate Identities for Decimation

In time domain:

Output of the left configuration:

D

k

mDmk

mDmk

mDm

mxmh

Dkmxkh

D

kkkDmxkh

kmxD

kh

D

mhmxmy

)(*)(

)()(

';)(

''

*)()(

'

Which is the output of the right configuration. In Z-Transform domain:

)()(

)(1

(1

)()()(

21

0

/1/2

1

0

/1/2/1/2

zHzX

zeHzeXD

zeXzeHHD

zXzHzY

D

kjD

k

DDk

D

k

DDkjDDDkj

DD

45

Efficient Implementation of Decimator

•The decimator and interpolator structures discussed so far are not very attractive for implementation.

•In decimation by a factor D, the downsampler discards D-1 samples from each set of D samples coming out of the decimation filter so unnecessary filtering is performed

46

Efficient Implementation of the Decimator

•In interpolation by a factor I, the interpolation

filter has to perform convolution on the zero

inserted upsampled signal so unnecessary

multiplications performed by the filter.

Using the concept of polyphase filter, efficient structures of interpolators and decimators in terms of computational complexity can be formed

47

Polyphase Interpolation

• Upsampling process inserts I-1 zeros between successive values of x(n)

• But only k out of M input values stored in the FIR filter are non-zero

• At one time instant , the non-zero values multiply h(0), h(I), h(2 I),..., h(M I)

• In the following instant multiply h(1), h(I+1), h(2I+1),..., h(M I +1)

• This implies that interpolation could be performed with I different filters.

Insert I-1 zeros FIR LPF

x(n) y(m)

x(n)

48

Polyphase InterpolatorInterpretation Example (1/2)

hI(n)x(n) y(m)

3v(m)

fx fv= 3fx fy= 3fx

Example: Interpolation by a factor I=3

( ) ( 3 )Ik

y m h m k x k

49

Polyphase InterpolatorInterpretation (2/2)

To calculate y(0), y(3), y(6),….;

x(n)’s are convolved with hI(0), hI(3), hI(6),….

To calculate y(1), y(4), y(7),….;

x(n)’s are convolved with hI(1), hI(4), hI(7),….

To calculate y(2), y(5), y(8),….;

x(n)’s are convolved with hI(2), hI(5), hI(8),….

50

Polyphase Interpolator Interpretation

•The original convolution can be broken down into three independent convolutions, each operating at 1/3 of the original sampling rate.

•The outputs of each of these filters can then be delayed and interleaved at the right order.

51

• Original large filter can be decomposed to a set of filters with impulse responses as

– pk(n) = h(k + nI) k = 0, 1, ....., I -1n = 0, 1, ....., K - 1

Polyphase Interpolating Filter(1/2)

52

p0(n)

p1(n)

p2(n)

pI-1(n)

s(n)

Fx

Fy = I Fx

y(m)

•Computation split across filters•Filtering at slower rate

Polyphase Interpolating Filter(2/2)

53

Iterpolating Polyphase Filters• Length of the interpolating and anti-aliasing filters should be

an integral multiple of I and D• Upsampling process inserts I - 1 zeros between successive

samples of s(n)– only K out of the M values of the FIR filter is used at one time instant

• M = filter length, K = M/I

– At one time instant, non-zero values multiplied by the filter coefficients • h(0), h(I), h(2I),...h(M-I)

– Next time instant• h(1), h(I + 1), h(2I + 1),...h(M - I + 1)

1 0 0 1 0 0 1 0 0 1 0 0

1 2 -1 3 4 -2 1 2 -1 3 4 -2

Interpolated DataI = 3

Filter coefficients at time t

2 -1 3 4 -2 1 2 -1 3 4 -2 1

-1 3 4 -2 1 2 -1 3 4 -2 1 2

Filter coefficients at time t+1

Filter coefficients at time t+2

54

Polyphase Decimators (D=3) (1/3)

hD(n)x(n) y(m)

3v(m)

fxfx fy= fx/3

( ) ( ) (3 )Dk

y m h k x m k

Output of the Decimator:

Example:

Decimation by a factor D=3

55

Polyphase Decimators (2/3)

To calculate the output samples, y(0), y(1), y(2)…,the input samples,

..x(-3), x(0), x(3),.. are convolved with h(0), h(3), h(6)

..x(-4), x(-1), x(2).. are convolved with h(1), h(4), h(7)

and

..x(-2), x(1), x(4).. are convolved with h(2), h(5), h(8)

56

Polyphase Decimator Example (3/3)

•The process can be viewed as three independent convolutions and their summation gives the desired outputs, y(0), y(1), y(2)….

•Instead of a single filter hI(n), now consider three filters, hI(3n), hI(3n+1), hI(3n+2), operating on three input sequences x(3n), x(3n-1), x(3n-2)..respectively. So there is no unnecessary convolution

57

p0(n)

p1(n)

p2(n)

pD-1(n)

y(m)

Fx

Fy = Fx/D

s(n)

Polyphase Decimating Filter (1/2)

58

Polyphase Decimating Filter (2/2)

• One out of every D output samples of the filter are used at the output of the decimator

• The set of polyphase filters defined as– pk(n) = h(k + n D)

k = 0, 1, ....., D -1 n = 0, 1, ....., K - 1

59

Polyphase Decimator Analysis

Time Domain Analysis:

k

D kDmxkhmy )()()(

Output of a conventional decimator:

Substituting:

10,for DililDk

Decimated signal:

1

0

)()(D

i lD iDlmxilDhmy

60

Polyphase Decimator Analysis (2)

)()( ilDhlp Di

Final output expression:

1

0

1

0

1

0

][)(

)(

)()(

D

iDi

D

ii

D

i li

imxmp

imDxmp

iDlmxlpmy

Defining:

61

Polyphase Decimator (contd.)

Conventional decimation can be decomposed into D separate filterings operations.

y(m) D p0(m)

D p1(m)

D pD-1(m)

z-1

z-1

x(n)

General Structure of a polyphase decimator

i=0

i=1

i=D-1

62

Polyphase Decimating Filter

• One out of every D output samples of the filter are used at the output of the decimator

• The set of polyphase filters defined as– pk(n) = h(k + n D) k = 0, 1, ....., D -1

n = 0, 1, ....., K - 1

p0(n)

p1(n)

p2(n)

pD-1(n)

y(m)

Fx

Fy = Fx/D

s(n)

An AlternativeRepresentation

63

Polyphase Interpolator Analysis (1)

Time domain Analysis:

Output of a conventional interpolator:

k

I I

kmxkhmy )()(

10,for DiliIlk

Substituting:

64

Polyphase Interpolator Analysis (2)

1

0

)()(I

i lI I

iIlmxiIlhmy

Interpolated Signal:

)()( ilDhlp Ii Defining:

1

0

1

0

])([

)()(

I

iIi

I

i li

imxmp

I

iIlmxlpmyFinal output

expression:

65

Polyphase Interpolator Implementation

General Structure of an 1:I interpolator

p0(n) I

p1(n) Iz-1

P(I-1)(n) I

x(n) y(n)

z-1

i=0

i=1

i=I-1

66

Polyphase Interpolating Filter

• Large filter can be decomposed to a set of filters with unit sample response as– pk(n) = h(k + nI) k = 0, 1, ....., I -1

n = 0, 1, ....., K - 1

p0(n)

p1(n)

p2(n)

pI-1(n)

s(n)

Fx

Fy = I Fx

y(m)

67

Sample Rate Conversion by Stages

Sometimes it is computationally more efficient to perform sample rate conversion in multiple stages.

H(z) Dx(n)

fx

y(m)

fx/D

Single Stage Decimator

fx/(D1D2) =fx/D

H1(z) D1 H2(z) D2x(n)fx fx/D1

y(m)

Two-Stage Decimator

68

Approach

•The signal is decimated by D1 in the first stage and D2 in the second stage, giving an overall decimation factor of D=D1D2.

•The filters H1(z) and H2(z) can be designed with wider transition bandwidth specifications since the overall filter response is narrow.

69

Advantages/Disadvantages of Sample Rate Conversion by Stages

• Fewer coefficients reduces finite word-length problems.

• Drawback: original decimation and interpolation ratios cannot always be easily factored into suitable numbers.

•More (likely acceptable) passband aliasing

• Reduced Computation

70

Input Signal:

Assume a bandlimited digital audio signal.

Bandwidth =4kHz, Sampling rate, Fs=8kHz, D=50

Decimation Lowpass Filter:

Passband: 0 to 75 Hz Peak passband ripple

p=10 -2

Transition band: 75 to 80 Hz Peak stopband ripple s=10 -4

Example Conversion by Stages

71

Example Conversion by Stages (2)

fN

sp

6.14

13log20 10

Where f = (fs-fp)/Fs is the normalized transition BW of the filter; fs and fp are passband and stopband edge frequencies respectively.

The approximate length of an FIR filter, according to Kaiser formula, is:

72

Example Conversion Single Stage (3)

Substituting the numerical values,

5150)8000/5(6.14

1310log20 610

N

Lowpass FIR filter has a length of 5150

The number of multiplications per sec is:

82400050

80005150sec M

73

Multistage Sample Rate Conversion Example (4)

The sample rate can be lowered to 160 Hz and still maintain the information. Hence the decimation factor is can be calculated as

50)80()2( sfD

74

Example Conversion by Stages (5)

Let the decimation be achieved in two stages. Let D1=25 and D2=2.

Two-Stage Decimator

H1(z) 25 H2(z) 2

x(n)

8 kHz 320 Hz

y(m)

160 Hz

75

Multistage Sample Rate Conversion Example (6)

•H1(z) and H2(z) are cascaded the overall linear passband specs can be halved between them.• Stopband specs can remain same for both since the cascade filters can only increase the overall stopband attenuation. • In choosing stopband edge, there is a tradeoff between the filter length and amount of tolerable aliasing in the passband

76

Multiple Stage Conversion Example (7)

Stage 1: Filter Specifications

Passband edge, fp=75 Hz.

Peak passband ripple, p= 0.005=(10-2/2)

Stopband edge, fs=240 Hz (=320-80),

Peak stopband ripple, s = 10-4

Sampling Rate, Fs=8 kHz

77

Multistage Sample Rate Conversion Example (8)

The choice of passband edge frequency depends on the decimation factor. In this case, due to the attenuation by filter, aliasing energy in the band from 240 Hz to 320 Hz will be small compared to that in 160 to 240 Hz, i.e, the stopband aliases on top of the passband.

78

Multistage Sample Rate Conversion Example (9)

fp= output sample rate of decimator stage - desired transition band upper frequency

166

8000/)75240(6.14

13)10)(005.0(log20

1

410

1

N

N

By Kaiser Formula, the approximate FIR filter length of the first stage:

79

Multistage Sample RateConversion Example (10)

Passband edge, fp: 75 HzPassband ripple, p = 0.005(=10-2/2)

Stopband edge, fs: 80 Hzstopband ripple, s = 10-4

Sampling frequency, Fs = 320 Hz

Stage 2: Filter specifications

80

Multistage Sample RateConversion Example (11)

Approximate length of this second stage FIR

219

320/)7580(6.14

13)10)(005.0(log20

1

410

1

N

N

Multiplication per sec for these two stage

881602

320219

25

8000166

sec.2sec,1sec

MMM

81

Multistage Sample RateConversion Example (12)

Summary:Implementation

approach Single-stage Two-stage

Number of filter

coefficients

5150 385

Number of multiplications

per sec

824000 88160

Computation is reduced by a factor of 8 with the two stage implementation.

82

Multistage Sample RateConversion Example (13)

Key to computational advantage:

Aliasing is allowed, especially in the bands of no interest.

83

Multistage Sample RateConversion Example (14)

f

4 kHz =Fs/2 8kHz =Fs

|X()|

fss=f/5080 Hz =Fs/2

160 Hz=Fs

Original signal spectrum:

Single stage decimation by 50:

No significant aliasing here

84

Multistage Sample RateConversion Example (15)

fts1=f/25240 Hz

320Hz=Fs

80 Hz

Two-stage decimation: After first stage decimation by 25:

fts2=fts1/2=f/50

80 Hz 160Hz=Fs

After second stage decimation by 2: Overall decimation by 50: Contains aliasing

85

Digital Filter BanksApplications

* Communications

Convert FDM to TDM signals

* Speech and Image Coding for Data Reduction

More bits to represent the lower band where most of energy is located

* Computational/Structural Advantages for Wideband Processing

86

Implementation of Digital Filter Banks (DFBs)

• Two basic structures: - DFB Analyzer: Splits signals into subbands - DFB Synthesizer: Combines the subbands into a wideband signal

87

Analysis Filter Bank

H (z)0

H (z)1

H (z)N-1

x(n)

BPF’s

Wideband

input signal

Narrowband output signals

N

N

N

88

Implementation ofDigital Filter Bank Analyzer

• The input signal is decomposed into N channel signals band pass filters with center frequencies

1,...,2,1,0;2

NkN

kk

•Each of these filtered signals is decimated to reduce the sample rate for each channel

89

•Hk (z), k=0,1, ..., N-1 is a uniform filter bank, H0(z) is a LPF.

H Hk

Nk Nk( ) , , , ,...,

0

2012 1

h n h n e k Nk

j nkN( ) ( ) , , , ,...,

0

2

0 1 2 1

or

Implementation of Analysis Filter Bank•Bandpass filtering can be viewed as down conversion and lowpass filtering. The frequency response of the bandpass filter is

90

Implementation of Analysis Filter Bank (2)

•Channel outputs are assumed to be critically sampled, i.e., the sample rate of the wideband signal is N times the sample rate of each narrow band signal.

•We will consider DFT and IDFT filter bank structures for the analyzer and the synthesizer respectively

91

Synthesis Filter Bank

G (z)0

G (z)1

G (z)N-1

x(n)

BPF’s

Narrowband input

signals Wideband output signal

N

N

N

92

Implementation of Digital Filter Bank Synthesizer (1)

• The desired band-pass image created by zero-augmenting is extracted by a BPF. All channels are summed to create a composite wideband signal.

93

Implementation of Digital Filter Bank Synthesizer (2)

G (z)0

G (z)1

G (z)N-1

x(n)

BPF’s

Nar

row

band

in

put s

igna

ls

Wideband output signal

N

N

N

94

DFT Filter Bank Analyzer - Basic Form

h0(n)

h0(n)

h0(n)

WN-(N-1)n

WN-(1)n

WN-(0)n

N X0(m)

N X1(m)

N XN-1(m)

x(n)

v0 (n)

v1 (n)

vN-1 (n)

95

DFT Filter Bank Analyzer - Basic Form (1)

• N-channel Uniform DFT Filter Bank Analyzer•Input signal, x(n) is modulated separately by the complex sinusoid:

NkWe knN

nN

kj

,..,1,0;2

shifting the original band of N channel stacking with center frequencies:

NkN

kk ,...,1,0;2

to N baseband channel signals

96

DFT Filter Bank Analyzer - Basic Form (2)

•Each channel signal is then lowpass filtered by h0(n), isolating the channel from the adjacent channels. The filter h0(n) also serves as the anti-aliasing filter for subsequent downsampling.• The lowpass filtered signals in each channel are then downsampled by N (critical sampling) to produce the final channel signals, Xk(m), k=0,1,…,N.

97

DFT Filter Bank Analyzer-Basic Form (contd.)Time Domain Analysis:

The channel outputs can be expressed as:

1,...,1,0),()( NkmNvmX kk

Where, the intermediate signal, v(n) is:

1,...,1,0,)()()( 0

NkWlxlnhnvl

klk

Final expression for the channel output signals :

1,...,1,0,)()()( 0

NkWlxlmNhmX kl

lk

Comparing with the definition of an N-point DFT:

1

0

1,...,1,0,)(N

l

klk NkWlxX

If h0(n)=1, n=0,1,…N-1, then the DFT filter bank analyzer performs an N-point DFT operation to produce the final N channel output signals, Xk(m), k=0,1,…,N-1 at each sample instant, m.

98

DFT Filter Bank Synthesizer - Basic Form

N g0(n)

WN(0)n

N g0(n)

WN(1)n

N g0(n)

WN(1)n

y(n)

Y0(m)

Y1(m)

YN-1(m)

y0(n)

y1(n)

yN-1(n)

v0(n)

v1(n)

vN-1(n)

99

DFT Filter Bank Synthesizer - Basic Form (1)

• The individual channel signals are first interpolated by a factor of N, where g0(n) is the lowpass anti-imaging filter for interpolation• Each interpolated channel signal is separately modulated by the complex sinusoid:

1,..,1,0;2

NkWe knN

nN

kj

100

•These frequency shifts the channel to their desired spectral locations, i.e., centered at: k=2k/N, k=0,1,…,N-1

•The synthesizer then sums all the channel signal to produce a single wideband output signal, y(n).

DFT Filter Bank Synthesizer - Basic Form (2)

101

DFT Filter Bank Synthesizer-Basic Form (contd.)

Time Domain Analysis

The channel signals in the synthesizer are:

1,...,1,0,)()()( 0

NklvlngWnyl

kkn

Nk

Where, the intermediate signal, vk(n) is:

,...2,,0,)( NNnN

nYnv kk

So, the channel signals are:

1,...,1,0,)()(

')'()(

0

'0

NklYlNngW

N

lYlngWny

kl

knN

lk

knNk

Output of the synthesizer:

l

N

k

knNk

N

kk

WlYN

lNng

nyN

ny

1

00

1

0

)(1

)(

)(1

)(

Definition of IDFT: 1,...,1,0,1

)(1

0

NnWYN

nyN

k

knNk

Therefore, assuming g0(n) is an FIR filter of length N, the synthesizer first perform an N-point IDFT on the N channel inputs, Yk(m), k=0,1,…,N-1 and then interpolates the resulting signal by a factor of N.

102

Summary of DFT Filter Bank Analyzer - Basic Form

•A wideband input signal is decomposed into several narrowband channel signals in the following way.

- The wideband signal is shifted byk=2k/N, k=0,1,…,N-1 to create N baseband channel signals.

- The N baseband channel signals are individually lowpass filtered to remove any high frequency components.

- The N lowpass filtered channel signals are each downsampled by a factor of N i.e., critical sampling, ensuring that total number of samples per unit time from all the N channel signals together is the same as that of the original wideband signal.

103

DFT Filter Bank Analyzer-Alternate Form

x(n)

h0(n)=h0(n)Wkn D

W-(0)mD

X0(m)

h1(n)=h0(n)W1n D

W-(1)mD

X1(m)

hN-1(n)=h0(n)W(N-1)n D

W-(N-1)mD

XN-1(m)

DFT Filter Bank Analyzer-Complex Bandpass Filter Representation

104

DFT Filter Bank Analyzer-Alternate FormAn alternative structure of the basic DFT filter bank analyzer is useful for reducing complexity.

The basic DFT filter bank analyzer output: (no critical sampling)

1,...,1,0,)()()( 0

NkWlxlmDhmXl

klk

It can be rearranged as:

1,...,1,0,)()(

)()(

)()()(

'

'

)(0

NkWnxnh

WlxlmDh

WlxWlmDhmX

kmDDk

kmD

lk

kmD

l

lmDkk

Where Nknjknk enhWnhnh /2

00' )()()( is the lowpass filter upconverted

to a complex bandpass filter by the complex sinusoid, ej2kn/N. So it is a center frequency at k=2k/N, k=0,1,…,N-1.

In case of critical sampling, i.e., D = N, the analyzer output :

1,...,1,0,)()()( ' NknxnhmX Dkk

105

Summary of DFT Filter Bank Synthesizer - Basic Form

In a DFT filter bank synthesizer several narrowband input signals are combined to form a single wideband output signal as follows:

- The N narrowband input signals are separately upconverted by a complex sinusoid, thereby, translating the baseband signals to N different bandpass signals with bands centered at k=2k/N, k=0,1,…,N-1.

- The N narrowband input signals are each interpolated by a factor of N, i.e., critical sampling, thereby changing the sample rate of each channel signal to that required by a wideband signal.

-The N bandpass channel signals are summed and scaled to form the single wideband output signal of the synthesizer.

106

DFT Filter Bank Analyzer-Alternate Form (Critical Sampling)

hk(n)=h0(n)Wkn N Xk(m)

DFT Filter Bank Analyzer-Complex Bandpass Filter Representation

(Critical Sampling case, D=N)

x(n)

107

DFT Filter Bank Synthesizer-Alternate FormSimilarly, for the basic DFT filter bank synthesizer, an efficient alternative structure can be realized in the form of complex bandpass filter representation

The channel signals in a basic DFT filter bank synthesizer: (No critical sampling)

1,...,1,0,)()()( 0

NklYlDngWny kl

knNk

Rearranging the expression:

)()(

)'()'(

)'('

)()()(

'

'

''

'

)'(0

'

)(0

ngWmY

lngWlY

WlngWD

lY

WlDngWlYny

kDkmD

Nk

lkD

DklNk

l

lnkN

DD

lk

Nk

l

lDnkN

klDNkk

Where, gk(n)=g0(n)WNkn is the complex bandpass filter representation of

the lowpass filter g0(n). In the case of critical sampling, i.e., D = N

)()()( ' ngmYny kDkk

108

Decimation and interpolation are the key operations and can be implemented with a polyphase filter.

Polyphase Implementations of DFT Filter Banks

Recallp0(n)

p1(n)

p2(n)

pD-1(n)

y(m)

Fx

Fy = Fx/D

s(n)

109

DFT Filter Bank Analyzer-Polyphase ImplementationApplication of polyphase structures for decimator in a DFT filter bank analyzer results in a highly efficient realization for practical purpose.

The basic DFT filter bank analyzer output: (with critical sampling)

1,...,1,0,)()()(

Or,

1,...,1,0,)()()(

0

0

NkWlmNxlhmX

NkWlxlmNhmX

l

klNk

l

klNk

Substituting: 10,, NirirNl

Analyzer output:

1

0

)(0 )()(

N

i r

irNkNk WiNrmxirNhmX

Defining: 1,...,1,0),()()()( 0 NiinNxnxandinNhnp ii

Final expression for the analyzer output:

1,...,1,0,)()(

)()(

)()()(

1

0

1

0

NkmxmpDFT

Wmxmp

WrmxrpmX

ii

N

i

kiNii

N

i r

kiNiik

110

DFT Filter Bank Analyzer-Polyphase Implementation for One Channel

p0(m)

p1(m)

pN-1(m)

Xk(m)

W-(0)k

W-(1)k

W-(N-1)k

i=0

i=1

i=N-1

x0(m)

x1(m)

xN-1(m)

x(n)

Polyphase Decomposition of the k-th channel of the DFT filter Bank Analyzer

111

DFT Filter Bank Analyzer-Polyphase Implementation for All Channels

p0(m)

p1(m)

pN-1(m)

i=0

i=1

i=N-1

x0(m)

x1(m)

xN-

1(m)

x(n) N-point DFT

0

1

N-1

X0(m)

X1(m)

XN-1(m)

Overall Polyphase DFT Filter Bank Structure

with an N-point DFT Operation Block

Allchannels

112

Reason for Computational Efficiency

•Only one branch of polyphase structure of the original lowpass filter, h0(n), is sufficient to calculate all of the N channel output signals, Xk(m), with the help of a DFT block as opposed to the Basic and Alternative forms that required a separate filter for each channel. Thus computation is reduced by a factor of N.

113

Reason for Computational Efficiency

• The decomposition of the decimation lowpass filter, h0(n) into an N branch polyphase network, pi(n), I=0,1,…, N-1, allows operations to be done using parallel processing with each branch operating at a slower rate.

• Efficient FFT chips are readily available.

114

DFT Filter Bank Synthesizer-Polyphase Implementation

Similar efficient structure can be realized for the DFT filter bank synthesizer

Output of a basic DFT filter bank synthesizer:

1,...,1,0,)(1

)()(1

00

NkWlYN

lNngnyl

N

k

knNk

Decompose the output into a set of N polyphase signals:

1,...,1,0),()( NiinNymyi

Synthesizer output: 1,...,1,0,,)(1

)(1

00

NkiWlYN

iNlmgmyl

N

k

kiNki

Defining: 1,...,1,0),()( 0 NiimNgmqi

Output of the synthesizer employing polyphase structure: 1,...,1,0,,)()(

)(1

)()(1

0

NkimYIDFTmq

WlYN

lmqmy

ki

l

N

k

kiNkii

115

DFT Filter Bank Synthesizer-PolyphaseImplementation (1)

N-point IDFT

q0(m)

q1(m)

qN-1(m)

y(n)

y0(m)

y1(m)

yN-1(m)

Y0(m)

Y1(m)

YN-1(m)

i=0

i=1

i=N-1

116

DFT Filter Bank Synthesizer-Polyphase Implementation

- N-point Inverse DFT of all the N channel signals, YK(m), k=0,1,…,N-1, at a particular sample instant, m.

- kth output of the IDFT operation is convolved with the kth branch polyphase filter, qk(m), k=0,1,…,N-1, at the same sample instant, m. This results in the output of the kth polyphase branch, yk(m).

117

DFT Filter Bank Synthesizer-Polyphase Implementation

- The final output, y(n), is the periodic (period N) sampling of these N-branch polyphase network and is implemented by a rotating switch.

118

Quadrature Mirror Filters (QMFs)

- Multistage filtering where each stage splits the band in half

- Used extensively in speech coding. DAT???????

- Used in image coding (capable of reducing 8 bits/pixel to 1/2 bit/pixel)

119

Analysis Filter

Speech(or Image)

Signal

LPF 2

HPF 2 Encoder 3

LPF 2

HPF 2 Encoder 2

Encoder 1

LPF H

HPF H

: ( )

: ( )0

1

1 2 3

4

2

Partitioned Band

2

H 0 ( ) H 1( )

0

Filter Responses

Characteristics of H0() and H1()This aliasing can be removed later.)

120

Synthesis Filter

Decoder 1 2 Filter

Decoder 2 2 Filter

Decoder 3 2 Filter

2 Filter

121

Primary building block is the two stage QMF.

LPF H z0( ) 2

2HPF H z1( ) 2 G z1( )

2 G z0( )

Analysis Section Synthesis Section

Xa0( )

Xa1( )

Xs0( )

Xs1( )

( )x n

What the filters must be for perfect reconstruction ?

DTFTs of decimated signals:Outputs of the analysis QMF

X X H X Ha0( )

1

2 2 2

2

2

2

20 0 (1a)

122

Output of analysis filters

X X H X Ha1 1 1

1

2 2 2

2

2

2

2( )

(due to decimation)

Output of synthesis filter ( ) ( ) ( ) ( ) ( )X X G X Gs s 0 0 1 12 2

(1b)

(2)

(3)

If we directly connect the analysis and synthesis filters, we should be able to perfectly reconstruct the signal.

(amazing because aliasing is present)

Combine Eqs. (1a), (1b) and (2).

( ) ( ) ( ) ( ) ( ) ( )

( ) ( ) ( ) ( ) ( )

X H G H G X

H G H G X

1

2

1

2

0 0 1 1

0 0 1 1

123

First term is to be unity and second term is due to aliasing and hence is to be zero.

Eliminate aliasing at output by

H G H G0 0 1 1 0( ) ( ) ( ) ( )

G H0 1( ) ( ) G H0 1( ) ( ) Pick and

Recall H0() is an LPF.H1() is an HPF.H H0 1( ) ( ) (Frequency translated HPF)

124

For notational simplicity define H() as a LPF.

Thus,

h n h n

h n h nn

0

1 1

( ) ( )

( ) ( )

and to eliminate aliasing, pick

g n h n

g n h nn

0

1

2

2 1

( ) ( )

( ) ( )

The "2" is used to normalize the gain for the interpolation.

Given these values, the QMF now behaves as an LTI filter (no aliasing).

125

Plug these filters into (3) to get the output and constrain the overall filter response to have a unity gain.

( ) ( ) ( ) ( )X H H X 1

22 2

For unity gain,

A H H( ) ( ) ( ) 2 2 1

126

We avoid filters with an odd number of coefficients (Type II filter) since the magnitude response is zero at =/2 (or at the original sample rate). We can simplify the design criterion above to satisfy by noting that

H H ej N

( ) ( )( )

1

2

H H e j N2 2 1( ) ( ) ( )

H H e

H e

j N

N j N

2 2 1

1 2 11

( ) ( )

( )

( ) ( )

( )

Hence

A H H( ) ( ) ( ) 2 2

(implies symmetry about /2)

127

1) Computer optimization techniques can be used to design an FIR filter so that A() 1 while having a good stopband characteristics (Tables are available).

2) Design IIR elleiptic filters.

3) Use half-band filters.

A half band filter can be used to satisfy the aliasing free condition by relaxing the linear phase constraint on h(n).

Half band filter:

Approaches for creating H()

b ncons t n

n

b n b n

( )tan

( ) ( )

20

0 0

These coefficients produce symmetry about /2.

128

2

2

2

Note:

The QMF can be implemented using polyphases for the decimating and interpolating functions to reduce the hardware complexity. (Details are given in Proakis)

129

Application of Multirate DSP: Transmultiplexers

* Used to convert between time-division-multiplexed (TDM) and frequency-division-multiflexed (FDM) in telephone communications.

To Transmitter

User 1

User 2

User N-1

TDM

e j 0

e j 1

e j N 1

User 1

User 2

User N-1

To Transmitter

FDM

130

Basic Group Channel

Stacked SSB Signals (12 form a basic group)

0 f

Voice Spectrum Single Sideband

(1/2 spectrum frequency translated)

-fc0 fc

f

4 KHz

48 f

(gets larger by stacking these basic groups.It is a relatively old transmission technique. TDM is more recent.)

131

FDM to TDM Conversion

SSB Demod. D s (n)1

SSB Demod. D s (n)2

SSB Demod. D s (n)N-1

TDM

Users

A/D

Signal

0 f

BasebandSSBSignal

LPF h(n)

cos ( )k n

SSB Demodulation

132

Note the similarity to the DFT analysis DFB.

e j n 0

e j n 1

e j nN

1

x(n)

h (n)0

h (n)0

h (n)0

X (m)0

X (m)1

X (m)N-1

D

D

D

LPF

FDMTDMOut

which can also be implemented as shown next.

133

p(m)0

p(m)1

p (m)N-1

x(l)

x(m)0

x(m)1

x(m)N-1

r(m)0

r(m)1

r(m)N-1

DFT

X(m)0

X(m)1

X(m)N-1

m=0

TDMOut

FDMIn

D=12 forbasic group

Recovered users

96KHz

134

TDM to FDM

Interpolator SSB Modulator

Interpolator SSB Modulator

Interpolator SSB Modulator

12 Channels8 KHz In12.8-96 KHz Out

D/A

TDM In

FDM Out

B(f)

1B(f)

f e j nk

VoiceSSB Modulated Signal

SSB Modulator

135

Implementations

G(f) is the combine interpolation LPF and B(f).

e j n0

e j n1

e j nN

1

D

D

D

N-1Y (m)

Y (m)1

Y (m)0

TDM In 96 KHz

G(f)

G(f)

G(f)

FDM Out

LPF

136

Alternate Approach

e j mD0

e j m D 1

e j m DN 1

Y (m)0

Y (m)1

Y (m)N-1

D

D

DN-1

G (f)0

G (f)1

G (f)

BPF

TDM In

FDM Out

137

Example: Use of Multirate DSP: Watkin-Johnson’s Base2

TM Base Station

• Motivation– Service the IS-136 market– Dynamic allocation of channel,modes,and bands– cost and size savings– ease in modifying vocoder, interference rejection

technique, and air interface change– smart antenna capability– enable: CDPD, RF finger printing, 911

138

Watkin-Johnson’s Wideband Base2 Transmitter

Cellular Forward Link Band

A,A+ or B,B+

16 bits

FFT-based channelizer not used because it would constrain the channels to equal bandwidths

LPFs must be good to reduce spurious from across channels.

NCO Software Defined

Connected to T1 line

139

Watkins-Johnson’s Wideband Base2 Receiver

A+ B+

clock12 bits

80 dB dynamic range30 dB added from AGC

NCO with goodspurious response

16 bits

Software Defined

Connected to T1 line

> 80 dB needed for SFDR achieved through dithering A/D

AGC is trick, overload impacts all calls and on the other end low level callers could be lost

A, A+ or B,B+

Cellular reverse link band

140

Drawback to the WJ Approach• Multicarrier Power Amplifiers

– Must have high dynamic range– Power per channel reduced for each new

channel

• Cost savings come with more RF channels– TDMA uses fewer RF channels

• Difficult to connect to the mobile switching center -- proprietary interface

141

Ericsson Base-Station

H0(z) N Sample Rate Conversion

Baseband Processing

H1(z) N Sample Rate Conversion

Baseband Processing

HM-1(z) N Sample Rate Conversion

Baseband Processing

x(n)

Figure: Classical Filter Bank View of a wide-band Channelizer

•The structure of the channelizer in the W-J Base-station receiver is similar to a classic DFT filter bank Analyzer (Basic Form)

•The alternate form (complex bandpass filter representation) of the a W-J Base-station is shown below, where Hk() = H0(-2k/M), H0(z) is LPF

142

Ericsson Base-Station (contd.)

Figure: Channelizer Employing DFT Filter Bank Polyphase Structure

E0(zM) N Sample Rate Conversion

Baseband Processing

E1(zM) N

EM-1(zM) N

x(n)

Sample Rate Conversion

Baseband Processing

Sample Rate Conversion

Baseband Processing

M-point IDFT

z-1

z-1

z-1

Employing the concept of polyphase implementation of a DFT filter bank analyzer, an efficient channelizer structure can be realized

Polyphase decomposition of H0(z) is:

1

00 )()(

M

i

Mi

i zEzzH

which is the z-domain representation of 10),()( 0 MiinMhnei

143

Problem with the DFT filter bank channelizer

From the implementation point of view the problem with both of these structures is the the filtering is done at higher sampling rate.

Due to downsampling by N, every N-th sample of the polyphase filter output is required.

A slight rearrangement in the polyphase filter structure can provide the solution (using the noble identity for the decimator)

Ei(zM) N = N

Ei,1

Ei,0

N

Assuming each polyphase filter, Ei(z) has two nonzero coefficients

1,...,1,0),()( 1,0, MizEEzE Mii

Mi

Where, Ei,o and Ei,1 are scalar quantities

The resulting Channelizer structure is called the Open Filter Bank (OFB) Channelizer

144

Open Filter Bank (OFB) Channelizer

M-point IDFT

Sample RateConversion

Baseband Processing

Sample RateConversion

Baseband Processing

Sample RateConversion

Baseband Processing

N E0,0

z-1

N E1,0

N EM-1,0

z-1

z-1

N E0,0

z-1

N E1,0

N EM-1,0

z-1

z-1

x(n)

Figure: Open Filter bank Channelizer

145

Reference of W-J and Ericsson Base Station

Watkins-Johnson’s Base Station

[1] Lober R. M., “Wideband, Software-Definable Base Station Technology: Approaches, benefits and Applications”, 7th Virginia Tech/MPRG Symposium on WIRELESS PERSONAL COMMUNICATIONS, June 11-13, 1997, pp. 15-1 thru. 15-12

Ericsson Base Station

[1] Zangi K. C., “Software Radio Issues in Cellular Base Stations”, IEEE Journal on Selected Areas in Communications, vol. 17, No. 4, April 1999, pp. 561-573

146

Multirate DSP and the Need for Synch.

• Carrier and Symbol Recovery– Oscillators vary from unit-to-unit

– Time, temperature and aging change

– Doppler

147

First Generation Digital Receiver Timing Recovery

SymbolTimingAnd CarrierSynch

IF

Anit-Alias Filter

ADCMatchedFilterX

Anit-Alias Filter

ADCMatchedFilter

900

X

I data

Q data

148

Problems

• Feedback path to continuous-time requires overhead parts and timing control.

• Matched filter delay in the feedback path reduces response time.

• Timing jitter in feedback clocks introduce noise.

• IF sampling not possible.

149

A More Modern Approach

SymbolTimingAnd CarrierSynch

IF

Anit-Alias Filter

ADCPolyphaseMatchedFilter

X

Anit-Alias Filter

ADCPolyphaseMatchedFilter

900

X

I data

Q data

Cos(2fct) clock

150

Advantages to the Modern Approach

• Handle multiple signal channels

• No feedback to the analog domain

• More flexible DSP implementation

151

Why is Synch. Difficult and How Do We Address the Problem?

Matched Filtered Symbol

Problem of Symbol Synchronization: Sample the symbol at the optimum point from the matched filer.

Matched Filter and Interpolated Symbol

Solution to the Problem:Upsample and match filter the signal so that a near optimal sample can be extracted.

152

p0(n)

p1(n)

p2(n)

pI-1(n)

s(n)

Fx

Fy = I Fx

y(m)

•Subsampled impulse response is combination of LPF and pulse impulse response•Computation split across filters•Filtering at slower rate (not all filters really needed)

Polyphase Matched Filter

Synchronization is a matter of picking the appropriate filter.

153

Approaches to Pick the Right Switch Position

• Early/Late Gate– Take advantage of symbol symmetry

• Maximum Likelihood– Take advantage of the derivative of the pulse

154

Early/Late Bit Synchronizers - Exploits the symmetry of the matched filtered signal.- Note the matched filtered signal output R() has a symmetric shape (neglecting distortion and noise)

Baseband signal

T0 2T

Early sampleLate sample

Optimal sample time

R()

T0+ T0-

Matched Filter

OutputSignal function of

The optimal timing is obtained when R() is sampled. If we take two measurements R(T0+) and R(T0-) and if T0=T, the two measurements

are equal then the optimal sample would be 1/2 between. An error signal to a timing recovery loop could be created by using |R(T0+)| - |R(T0-)| .

Note the absolute value eliminates ambiguity of data polarity.

155

Maximum Likelihood Techniques

• Measure the slope of the pulse to get a sense of what side of the peak the samples are on.

• A zero derivative means the peak has been sampled.

Interpolated Matched Filtered Signal

Positive slope:Move pointer to the right

Slope= S

•Slope times y(m) or sign(y(m)) gives a polarity independent metric of distance from the optimal point for tracking which are the useful polyphase filter outputs

156

Realization 1: Maximum Likelihood

p0(n)

p1(n)

p2(n)

pI-1(n)

s(n)

Fx

Fy = I Fx

y(m-1)

•Pick three outputs at once.•Numerical derivative [y(m-1) – y(m+1)]/T can be computed.•Derivative is used to know if the switch should be advanced or delayed

y(m+1)

y(m)

157

Realization 2: Maximum Likelihood

p’0(n)

p’1(n)

p’2(n)

p’I-1(n)Fx

Fy = I Fx

y ’(m)

p0(n)

p1(n)

p2(n)

pI-1(n)

s(n)

Fx

Fy = I Fx

y(m)

Note: pi’ is the derivative of the interpolating matched filter pi

158

Symbol and Carrier Synch.

N-point IDFT

q0(m)

q1(m)

qN-1(m)

y(n)

y0(m)

y1(m)

yN-1(m)

Y0(m)

Y1(m)

YN-1(m)

i=0

i=1

i=N-1

IF

Slow Drift

Freq.

Removal

X

BasebandSignal

Interpolator and Channelizer

Switch Position for Frequency Translation

Swich position for interpolator phase (symbol timing)

159

Cascaded Integrated Comb Filters

160

Overview of CIC Filters• CIC Filters: What are they?

• Characteristics– Advantages, Disadvantages, Uses

• Frequency Characteristics

• Transfer Function for Partial stages

• Maximum Register Growth

• Truncation Effects

• Design Example

• Interpolation Filters

161

Introduction to CIC Filters

• Efficient way to implement multirate filters without the use of multipliers

• Structure– Integrator section operating at the high

sample rate – Comb section operating at the low

sample rate

162

Integrator Section

• Integrator section – N ideal digital integrator stages operating at

the high sampling rate, fs

– HI(Z) = 1/(1 – Z-1)

Z-1 Z-1

Stage 1

163

Comb Section

• Comb section – M differential stages operating at

low sampling rate fs/R

– HC1(Z) = 1 – Z-M

Z-M Z-M

-1 -1

164

CIC Decimation and Interpolation Filters

Integrator Sectionfs

Comb Section fs/R

Integrator Section

Comb Sectionfs fs/R

Decimation Filter

Interpolation Filter

165

Example Decimation Filter

Decimation Filter

Z-1 Z-1

Stage 1

Z-M Z-M

-1 -1

fs fs/R

Stage N Stage N+1 Stage 2N

166

Derivation of Transfer Function

• Decimation filter

• Sampling frequency reduction from fs to fs/R, is done at the switch

• Comb section operates at low sampling rate fs/R

• System function of a single comb section as referred to the higher frequency,HC(z) = 1 – z-RM

Equivalent Structures

167

Characteristics Advantages

No multipliers or storage for filter coefficients Structure is very ‘regular’ Little external control or complicated timing

required Same filter design can be used for wide range of

R

Disadvantage– Register widths can become large for large rate

change factors– Limited range of filter characteristics

168

Applications of CIC Filters

• Applications–Areas where high sampling rates

make multipliers an uneconomical choice

–Areas where large rate change factors R, would require large amounts of coefficient storage or high speed filtering

169

Frequency Characteristics

• Transfer function of decimation filter

NRM

k

kN

NRM

NC

NI

zz

z

zHzHzH

1

01)1(

)1(

)()()(

X[N]

[N]

[N]

[N]

RM

2

Equation (1)

170

Frequency Response

N

jj

RMjRMj

j

RMj

Nj

NRMj

ee

ee

e

e

e

ezH

)(

)(

)1(

)1()(

22

22

2

2

jez Equation (2)

171

Magnitude Response

NN

R

ffM

RM

zH

)sin(

)2sin(

)2

sin(

)2

sin()(

Equation 2

Rf 2

172

Power Response

N

R

ffM

fP

2

)sin(

)2sin()(

173

Frequency Response

0 0.5 1 1.5 2 2.5 3-120

-100

-80

-60

-40

-20

0

Frequency relative to low sampling rate (f)

Mag

nitu

de r

espo

nse

(dB

)

f

c

2fc

2fc

Aliasing Bands

If fc = 1/8

Frequency Response N = 4, M = 1, R = 7

174

Register Growth and Truncation Effects

• Maximum register growth value useful in determining truncation effects

• Partial transfer function– Transfer function from each stage gives

insight into truncation effects– Helps determine number of bits which can

be discarded at each stage– Helps determine characteristics of the

overall filter

175

Transfer Function from the jth Stage

• 1 j N

• Substitute k = RMl +v – Range of l that does not force v out of range

• l = 0, 1,…, [k/(RM)]

j = 1,2, …, N

NC

jNIj HHzH 1)( 11)1(

)1()(

jN

NRM

iz

zzH

)(

0 0

00

)1(

)1()(

vRMlN

l

l

v

v

v

N

l

lRMlj

zv

vjN

l

N

zv

vjNz

l

NzH

k

k

lRMk

lj z

RMlk

RMlkjN

l

NzH

0

/

0)1()(

Equation (4)

Equation (5)

Equation (6)

176

Dimensional Analysis

• 1 < j < N– Divide numerator by denominator in Equation (4)

• Order of the polynomial in terms of z-1

– RM(j – 1) + (RM-1)(N-j+1) = (RM – 1)N + j – 1 Equation (8)

• Hence

11

0

1)1()(

jNRM

k

kjRMj zzzH Equation (7)

1)1(

0)()(

jNRM

k

kjj zkhzH Equation (9)

177

Transfer Function from the jth Stage

• N < j 2N

• Overall Transfer Function

12

0

12

)1(

)1(12

)1(

)()(

jN

k

kRMk

jNRM

jNCj

zk

jN

z

zHzH Equation (10)

12

0

1)1(

0

)(

)()(

jN

k

kRMj

jNRM

k

kjj

zkh

zkhzHEquation (11)

j = 1, 2, … N

j = N+1, N+2, … 2N

178

Maximum Register Growth• Maximum output magnitude resulting from the

worst possible input signal relative to the maximum input magnitude – If M2 is the maximum possible output when the worst

case input M1 is applied, the register growth Gmax is defined as• Gmax = M2/M1

• M2 = Gmax M1

• Impulse response from the jth stage onwards: hj(k)– For the worst case conditions, all the 2N stages of CIC filter have

to be considered

– The corresponding impulse response

• h1(k), k = 0 … (RM-1)N

179

Evaluating Register Growth

• Output of the filter

• Taking the magnitude

– M1 is the maximum possible value of the input which gives an output of M2

• Maximum register growth

• Since all the coefficients are positive, |h1(k)| = h1(k)

NRM

kkhknxny

)1(

01 )()()(

NRM

kkhknxny

)1(

01 )()(|)(|

1|)(||)(||)(|)()(|)(|)1(

01

)1(

01

)1(

01 Mkhknxkhkhknxny

NRM

k

NRM

k

NRM

k

NRM

kkhMMG

)1(

01max |)(|1/2

180

Evaluating Register Growth

• evaluated at z = 1

• Let Bin be the number of bits in the input data

– Bin = log2(M1),

– Bmax = output bits required when there is maximum register growth

)()( 1

)1(

01 zHkhNRM

k

NNRM

kz

RMzH )(1)(1

01

NNRM

k

NRM

kRMkhkhG )()(|)(|

)1(

01

)1(

01max

See Equation (11)

inBRMNMGB )(logloglog 22max2max

181

Affects of Truncation and Rounding• In practice it may be necessary to truncate registers

• Truncation or rounding used to constrain Bmax

• Total of 2N+1 error sources – 2N sources from truncation/rounding at inputs to 2N filter

stages– Last error source from truncation/rounding at output register

• Assume each error source produces white noise uncorrelated with input and other error sources

• Error at jth source (ej) assumed to have uniform probability distribution in range [0 - ] – Bj = number of LSB's discarded at the jth source

jB2

182

Mean and Variance of Error• Mean error at jth source

• Variance of error at jth source

• Output error mean and variance due to stage j

– Note: expressed in terms of impulse response from the jth stage to the output

• Total statistics at jth stage are sums of statistics for each impulse response coefficient

jBjB

jBjj xdxeE 22

1

2

1][

2

0

222 ])[(][])[( jjjjj eEeEeE

222

0

2 )2(3

1

2

1][ jB

jB

jBj dxxeE 2)2(

12

1 jBj

)(, kh jjkj )(22,

2 kh jjkj

183

Mean and Variance of Error

• Total statistics at jth stage are sums of statistics for each impulse response coefficient

j = 1,2, … 2N

j = 2N+1

j = 1,2, … 2N

j = 2N+1

• Mean Error gain is zero except for j = 1 and 2N+1

j

kjjTj kh

)(

1

)(22

k

jjkhF

k

j kh )(

N

kRMkh )()(1

222j

jTj F

184

Total Mean and Variance at Output

• Mean: affected by truncation/rounding at first and last sources

• Variance: affected by truncation/rounding at all error sources• Design decision

– Make variance from the first 2N error sources less than or equal to variance from last error source

– Distribute the error equally among these sources–

• Number of bits that can be discarded at each stage

)12(1

12

1

NTT

N

jTjT

12

1

22N

jTjT

N

FB Njj6

log2/1loglog 21222

212

22 62 Nj

jB

NF

185

Design Example: What’s Possible• Design a filter to reduce sampling rate from 6MHz to 240 kHz

– passband = 30kHz – aliasing attenuation must be better than 60 dB with a fall off in the

passband of less than 3dB – number of bits in the input and output registers is 16

• Rate change factor R = 25

• Bandwidth relative to the low sampling rate fc = 30/240 = 1/8

• Filter with N = 4 and M = 1 results in an aliasing attenuation of 68.5dB, and passband attenuation of 0.9dB

• Number of LSBs discarded: B2N+1= Bmax - Bout = 19

• LSBs discarded at each stage is: 1, 6, 9, 13, 14, 15, 16, and 17

3516644.4*416)25(log4 2max B

186

CIC References

• Eugene B Hogenauer, “An economical class of digital filters for decimation and interpolation,” IEEE Transactions on Acoustics, speech and signal processing, vol. ASSP-29, No. 2, pp. 155-162, April 1981

• Callie Riley et. al., ”High decimation digital filters,” ICASSP, vol. 3, pp. 1613-1616, 1991

• Alan Y. Kwentus, “Application of Filter sharpening to cascaded integrator comb decimation filters,” IEEE Transactions on Signal Processing, vol. 45, No. 2, pp. 457-467, 1997