You are on page 1of 42

c[n ]

Sampling Rate Conversion

c[n ]

Outline
Standard approach
Decimation by a factor D
Interpolation by a factor I
Sampling rate conversion by a rational factor I/D
Sampling rate conversion by an arbitrary factor

Down-Sampler
Figure below shows explicitly the timedimensions for the down-sampler

x ( n)
Input sampling frequency

Fx

Tx

y [ n ] x ( nM )
Output sampling frequency

Fy

Fx
M

Copyright 2001, S. K.

Down-Sampler
Consider a factor-of-2 down-sampler with
an input x[n] whose spectrum is as shown
below

The DTFTs of the output and the input


sequences of this down-sampler are then
related as
1
j

Y (e ) { X (e j / 2 ) X (e j / 2 )}
2
Copyright 2001, S. K.

Down-Sampler
Now X (e j / 2 ) X (e j ( 2 ) / 2 ) implying
j

/
2
X
(

e
) in the
that the second term
previous equation is simply obtained by
shifting the first term X (e j / 2 ) to the right
by an amount 2 as shown below

Copyright 2001, S. K.

Down-Sampler
The plots of the two terms have an overlap,
and hence, in general, the original shape
)lost when x[n] is down-sampled as
of X (e jis
indicated below

Copyright 2001, S. K.

Down-Sampler
This overlap causes the aliasing that takes
place due to under-sampling
There is no overlap, i.e., no aliasing, only if
X ( e j ) 0
for / 2
Note: Y (e j ) is indeed periodic with a
period 2, even though the stretched
version
is periodic with a period
X (e jof)
4
7

Copyright 2001, S. K.

Down-Sampler
For the general case, the relation between
the DTFTs of the output and the input of a
factor-of-M down-sampler is given by
M 1
1
j ( 2 k ) / M )
Y ( e j )
X
(
e

M k 0

Y (e j ) is a sum of M uniformly
shifted and stretched versions of X (e j )
and scaled by a factor of 1/M
8

Copyright 2001, S. K.

Aliasing is absent if and only if


as shown below for M = 2
X (e j ) 0 for / M
X (e j ) 0 for / 2
Y (e

j )

1
{ X (e j / 2 ) X ( e j / 2 )}
2

Copyright 2001, S. K.

c[n ]

Decimation by a Factor D

HD (e jw )

Standard choice (for avoiding aliasing):

10

c[n ]

Standard Approach
Decimation by a Factor D

11

Up-Sampler
Time-Domain Characterization
An up-sampler with an up-sampling factor
L, where L is a positive integer, develops an
output sequence y[n] with a sampling rate
that is L times larger than that of the input
sequence x[n]
Block-diagram representation
x[n]

12

y[ n ]

Copyright 2001, S. K.

Up-Sampler
Up-sampling operation is implemented by
inserting L 1 equidistant zero-valued
samples between two consecutive samples
of x[n]
Input-output relation
x[n /L],
y[n]
0,

13

n 0, L, 2 L,L
otherwise
Copyright 2001, S. K.

Up-Sampler
In practice, the zero-valued samples
inserted by the up-sampler are replaced
with appropriate nonzero values using some
type of filtering process
Process is called interpolation.

14

Copyright 2001, S. K.

Up-Sampler
Frequency-Domain Characterization( Frequency
Spectrum )

Consider first a factor-of-L up-sampler


whose input-output relation in the timedomain is given by

x[n / L], n 0, L, 2 L,K


y[n]
otherwise
0,
15

Copyright 2001, S. K.

Up-Sampler
In terms of the z-transform, the input-output
relation is then given by
y( z)

y[n] z n

x[n / L] z n

x[m] z Lm X ( z L )

Y ( z) X ( z )
L

16

Copyright 2001, S. K.

Up-Sampler
Put

ze
j

in above Equation we get

Y (e ) X (e

17

j L

Copyright 2001, S. K.

Up-Sampler
Figure below shows the relation between
j
j
Y (e for) L = 2 in the case of a
X (eand)
typical sequence x[n]

18

Copyright 2001, S. K.

Up-Sampler
As can be seen, a factor-of-2 sampling rate
j
expansion leads to a compression of X (e )
by a factor of 2 and a 2-fold repetition in
the baseband [0, 2]
This process is called imaging as we get an
additional image of the input spectrum

19

Copyright 2001, S. K.

Up-Sampler
Similarly in the case of a factor-of-L
sampling rate expansion, there will be L 1
additional images of the input spectrum in
the baseband
Lowpass filtering of y[n] removes the L 1
images and in effect fills in the zerovalued samples in y[ n] with interpolated
sample values
20

Copyright 2001, S. K.

Interpolation by a Factor I

Standard choice (for suppressing replicas):

21

c[n ]

Standard Approach
Interpolation by a Factor I

22

c[n ]

Standard Approach
Conversion by a Rational Factor I/D

If the factor is not rational then conventional rate conversion cannot


be implemented using up-samplers, down-samplers and digital
filters.
To retain efficiency, it is custom to resort to non-exact methods such
as first and second order approximation.

23

First noble identity:-

24

Second noble identity:-

Second noble identity is for up-Sampling. We know the


input/output relation of a up-sampler given by
y[n]=
for n= 0,I,2I,3I .
0

25

otherwise.

Second noble identity

26

Second noble identity cont.

From figure (a) we can write


V1(z)=x(z)H(z)(1)
Y(z)=V1(zI)=X(zI)H(zI)

..(2)

Similarly consider the figure(b)


V2(z)=X(zI)..(3)
Y(z)=V2(Z)H(ZI)= X(zI) H(ZI)

(4)

Equn(2) & eqn(4) are equal and they are relations of Second noble
identity.

27

Sampling rate conversion with cascaded integrator Comb


filters:-

The hardware implementation of the lowpass filter required for


sampling rate conversion can be significantly simplified if we choose a
comb filter with transfer function

H(Z)=

This system can be implemented by cascading either the integrator


with the Comb filter 1-

or vice versa. This leads to the name

Cascaded Integrator Comb (CIC) ffilter. This structure does not


require any multiplication and storage for filter coefficients.
28

To obtain an efficient decimation structure:


we need to consider an Integrator-Comb CIC filter followed by the
Down-sampler & then apply the first noble identity as shown below

29

To obtain an efficient integrator structure: we need to consider an Up-sampler followed by the IntegratorComb CIC filter & then apply the Second noble identity as shown
below:

30

To improve the lowpass frequency response of sampling rate


conversion we can cascade K-CIC filters. In this case we order all
integrators on one side of the filter & the Comb filters on other
side& then we apply the noble identities as in the single stage. The
integrator

is an unstable system. Therefore its output may

grow without limits resulting overflow when integrator section first as


shown in above fig11.5.5b. however this overflow can be tolerated if
the entire filter is implemented using twos complement fixed-point
arithmetic. If DM or IM( where M= No.of decompositions) then the

31

Comb filter 1-

in figures 11.5.5(a) & 11.5.6(b) should be replaced

by 1 -

respectively.

or 1-

Polyphase structures for Decimation &


interpolation filters:-

32

33

This system is realized by first inserting I-1 zeros between successive


samples of x[n] & then filtering the resulting sequence by the filter
which has the high sampling rate IFx . the filter H(Z) is replaced the
Transpose polyphase structure. We know the transpose poylphase
structure for M=3 i.e

34

If I=3 then the above interpolation system shown in 11.5.11 is


implemented using transpose polyphase structure as shown in
below

35

Multistage implementation of sampling Rate Conversion:-

When the sampling rate by a factor D or I are greater than unity we


need to go for multisatges. First consider Interpolation by a factor

(unity) & let us assume that I can be factored into a product of


positive integers as

36

Then interpolation by a factor I can be accomplished by cascading LStages of interpolation and filtering as shown in below figure
Note that the filter in each stage of interpolator s eliminates the images
introduced by Up-sampling process in the corresponding interpolator.

37

Similarly in Decimated by a factor D may be factored into


positive integers as

38

Thus the sampling rate at output of ith stage is


i= 1,2,3,4. J
The input sampling rate for input x[n] is F0=Fx.. To ensure no aliasing
occurs in overall decimation process, we need to design each filter
stage to avoid aliasing within the frequency band of interest. Let us
define the desired Passband & Transition band in overall decimator as
Passband

Transition band:
Where

0 F Fx
Fpc F Fsc

Fsc Fx /2D. Then aliasing in the band 0 F Fsc is avoided by

selecting the frequency bands of each as as follow:


Passband

Transition band:
39

Stopband :

0 F Fpc
Fpc F Fi -Fsc
Fi -Fsc F

For example in the first filter stage we have F 1 = Fx/D1 & the filter is
designed to have the following frequency bands:
Passband

0 F Fpc

Transition band:
Stopband :

F pc F F1 -Fsc
F1 -Fsc F

After Decimated by D1 there is aliasing from the signal


components that fall in the filter transition band, but the aliasing
occurs at frequencies above Fsc . Thus there is no aliasing in the
frequency band
0 F Fsc

40

Advantages of Multirate Digital Signal processing:-

It requires less computation.


It has very low finite arithmetic effects.
It requires less memory.
The multirate signal processing requires very low filter
coefficients

41

Applications of Multirate Digital Signal Processing:-

Analog to Digital & Digital to Analog Converter.


Subband coding of speech Signal.
Transmultiplexers.
Implementation of narrow band low-pass filtering.
Design of Phase Shifters.
Implementation of Digital filterbbanks.

42

You might also like