0% found this document useful (0 votes)
178 views8 pages

Upsampling and Downsampling

Uploaded by

Amit Prajapati
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
178 views8 pages

Upsampling and Downsampling

Uploaded by

Amit Prajapati
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

pipe isdeloolucr ofgeno

Chapter 13

Multirat ate Digital Signal Processing


Fundamentals

edial signal processing structures discussed so far in this text belong to the class of single-rate
Thedigit
since the sampling rates at the input, at the output, and at all internal nodes are the same, There
gstuy
systems
applications where the signal at a given sampling rate needs to be converted into another signal
are ferent sampling rate. For example, in digital audio, three different sampling rates are presentl
nloved: 32 kHz in broadcasting,44.1 kHz in digital CD, and 48 kHz in digital audio tape (DAT) and
different rates
ther applications [Lag82]. Conversion of sampling rates of audio signals among these three
is necessary in many
situations. Another example pitch control of audio recordings usually performed
is

by varying tape
recorder speed. However, such approach changes the sampling frequency of the digital
an

signal and, as a result, conversion to the original sampling rate is needed [Lag82]. In video applications.
the sampling rates of NTSC (National
Television Systems Committee) and PAL (Phase Alternate Line)
14.3181818 MHz and 17.734475 MHz, whereas the sampling
composite video signals are, respectively,
13.5 MHz and 6.75 MHz for the luminance and the color-
rates of the digital component video signal
are

difference signals, respectively Lut91). There are other applications where it is convenient (and often
judicious) to have unequal rates of sampling at the filter input and output and at internal nodes. Examples
CD.
ofsuch sampling rate alterations are described in the accompanying
To change the sampling rate of a digital signal, multirate digital signal processing systems use a down-

Sampler and an up-sampler, the two basic sampling conventional1


rate alteration devices, in addition to
clements such as an adder, a multiplier, and a delay. Discrete-time systems with unequal sampling rates
u various parts of the system are called multirate systems and are the subject of discussion of this chapter.
and a down-sampler both in the time do-
.ve nrst examine the input-output relations of an up-sampler
the transform domain. As in many applications, cascade connections of the basic sampling rate
nd
or
alterati
sampling rate alterations, the basic sampling rate alteration
basic devices
cascade are invariably are
equivalences employed together
then reviewed.
aO devices and digital filters are employed; some
response specifications of these filters are devel-
OnadprOpriate lowpass digital filters. The frequency
ext A computationally more eficient approach to sampling ratealteration, based on a multistage
is
illustrated by of a
entation,
Bita
specific
means of a The polyphase decomposition
design problem.
is reexamined next in the framework of multirate theory, and its application to developing com-
Eealy efficient sampling rate alteration systems is illustrated. A review of the design of sampling
eerters with arbitrary conversion rate based on the Lagrange and spline interpolation algorithms
an ed The chapter concludes with a discussion on Lth band filters and their design.

14considers the analysis and design of multirate filter banks.


IR
Recommendation No. 601
739
740 Chapter 13: Multirate Digital Signal Processing Fundamentals
Input sequence Output sequence upsampled by 3

0.5

Ogeelesleale

-0.5
-0.5

40 50 10 20 30 O
10 20 30 0

priee Time index n

(a)
Time index n

(b)
elsine Figure 13.1: Illustration of the up-sampling process.

xn]

Figure 13.2: Block diagram representation of an up-sampler.

13.1 The Basic Sampling Rate Alteration Devices


The two basic components in sampling rate alteration are the up-sampler and the down-sampler, intro-
duced earlier in Section 2.24 where we examined their input-output relations in the time domain. How.
ever, it is also instructive to analyze their operations in the frequency domain. This will point out why
these devices must be used with additional filters. In addition, a frequency-domain analysis provides
the basic foundation for analyzing more complex multirate systems introduced in the latter parts of the
chapter.
oeiMTALECTI bas slM B181218Idouoqgemns
13.1.1 Time-Domain Characterizationa luogle ooboe
We reexamine the time-domain characterizations of the two basic sampling rate alteration devices. An
up-sampler with an up-sampling factor L, where L is a positive integer, develops an output sequence
u n) with a sampling rate that is L times larger than that of the input sequence xn). The up-sampling
operation is implemented by inserting L- 1 equidistant zero-valued samples between two consecutive
samples of the input sequence x|n] according to the relation
noieep X n=Xn/L), n
=0, tL,+2L,...,oees tomo
otherwise. ugupgn a f d

The up-sampling operation is illustrated in Example 13.1.

eEXAMPLE 13.1llustration of Up-Sampling Operation esd adi,a


Program 13 1 can be used to study up-sampling of a sinusoidal input sequence. Its input data are tuc

P length of the input sequence, the up-sampling factor, and the frequency of the sinusoid in Hz. t
Program o p l o t s the input sequence and its up-sampled version. Figure 13.l shows the result obtained for a iengu
131.m 50 sinusoidal sequence with a frequency of 0.12 Hz and with an up-sampling factor of 3.

The block diagram representation of the up-sampler, also called a sampling rate expander 0rS

an expander, is shown in Figure 13.2.


e of
In practice, the zero-valued samples inserted by the up-sampler are interpolated using solu T
filtering process in order that the new higher-rate sequencehas no unnecessary spectral componenl
process, called interpolation, is discussed later in this chapter.
Sampling Rate Alteration Devices 10tqas
T h eB a s i c

741
1 3 1

Input sequence
Output sequence downsampled by 33

0.5
-0.5

20 40
10 10 30
Time index n
Time index n
(a)
(b)
Figure 13.3: Illustration of the down-sampling process.
ioilggo

xn Myn
Figure 13.4: Block diagram representation of a down-sampler.

On the other hand, a down-sampler with a down-sampling factor M, where M is a positive integer.
ates an output sequence ynl with a sampling rate that is (1/M)th of that of the input sequence xn].
The down-sampling operation is implemented by keeping every Mth sample of the input sequence and
emoving the M - 1 in-between samples to generate the output sequence according to the relation

n = x{nM]. (13.2)
As a result, all input samples with indices equal to an integer multiple of M are retained at the output and
are discarded, as illustrated in Example 13.2.
allothers
EXAMPLE 13.2 Illustration of Down-Sampling Operation
We investigate down-sampling of a sinusoidal input sequence using MATLAB. To this end, we utilize
Program 132. Its input data are the length of the input sequence, the down-sampling factor, and the
frequency of the sinusoid in Hz. It then plots the input sequence and its down-sampled version. The re-
Programn
sult obtained for a length-50 sinusoidal sequence with a frequency 0.042 Hz and with a down-sampling
132m
factor of 3 are shown in Figure 13.3.

The block diagram representation of the down-sampler or sampling rate compressor is shown in
Figure 13.4.
the The
involved have not been explicitly shown in Figures and 13.4. This is in
sampling periods
inteiest of simplicity and in view of the fact that the mathematical theory of multirate systems can
13.2
derstood without bringing the sampling period T or the sampling frequency Fr into the picture.
lt is in
in the sampling
al in the
beginning to explicitly see the time dimensions at various stages
book, however, the explicit
DDear process, as indicated in Figure 13.5. In the remainder of this values are relevant.
Th
h orthe sampling frequency Fr is not shown unless their actual
13.2 and 13.4 are often used together
um pier and the down-sampler building blocks of Figures discussed in m o e detail in this
applications involving multirate signal processing and are
chapter and Or
chapter
is to
Chapter 14. For ample, one application using both types of sampling rate alteration devices
achieve a s
rate change by rational number rather than an integer value. Example 13.3
ilustrates another application.
Sampling a
742 Chapter 13: Multirate Digital Signal Processing Fundamentals
xn]= xnT) M lnl= x,(nMT
Input sampling Output sampling

frequency F=T frequency= F-MMT

(nT/ L). n
=0,t L,t2L,...
x, iT)tL n=a 0, otherwisee
Input sampling Output sampling
frequency = F = LFy =5
frequency y7
Figure 13.5: The sampling rate alteration building blocks with sampling rates explicitly shown.

x[n]- 12 t2

12 2
Figure 13.6: A simple multirate system.

EXAMPLE 13.3 Analysis ofa Simple Multirate Structure


Consider the multirate system of Figure 13.6. Its operation can be analyzed by writing down the rela-
tions between various signal variables and the input, as depicted below:

n.
12 34 5 6 7 8

xn]:x[0] x[1] x2] x[3]x[4] x[5 x[6 x[7 x[8


vn: x[0 x2] x4] x6 x[8 x[10] x[12] x[14 x[16
wn: x-1] x[l] x[3] x[5] x[7 x[11] x[13) x[15
Vun): x[0] x21 x[41 x[6] 0 x[8
wun: x-1 0x[l] 0 x[3] 0 x[51 0

Vun- 1]: 0 x[0 0 x{2] 0 x[4 x[6) 0

nl: x-1] x[0 x[] x{2] x[3 x[4] x[5 x6)


l tcan be seen from the above that the output yn] of the multirate system of Figure 13.6 is grven
ynl = vu n - 1] + wu n), which is simply x n - 1 ] . A formal proof of the perfect reconstructu

property of the multirate structure of Figure 13.6 is left as an exercise (Problem 13.1).

nput sequence
A multirate structure in which the
output sequence is a delayed and scaled replica of the u Simple

is called a perfect reconstruction multirate system. Thus, the structure of Figure 15.0 15 *
example of such a system.
Iscrete-time systems (Prob-
It can be shown that the up-sampler and the down-sampler are linear disc screte-time

lem 4.2). Moreover, it has been shown in Example 4.5 that the
up-sampler is a time-vary1ng
Basic
Sampling Rate Alteration Devices 743
e

it can bbe shown that the down-sampler is also a time-var


varying discrete-time systemm
Likewise,

(Problem132).

Frequency-Domain Characterization
131.2

i n v e
tigate the
s t
the relation between the input and output spectra of the up-sampler and the down-
i g a t e

RenOW
SAper

Domain Representation of the Up-Sampler


Frequency

the relations between the spectra of the input and the output of a factor-of-2 up-sampler.
Refirstd e r i
input-output relation of the factor-of-L up-sampler given by Eq. (13.1), we arrive at the core-
Fromthe i n
for the factor-of-2 up-sampler.
ingrelation
xu= Xxn/2). n =
0. +2, +4. (13.3)
0. otherwise.

erms of the z-transform. the input-output relation is then given by

)= un: = xn/2]

= xm=-2m=X(E). (13.4)

ha similar manner, we can show that for the factor-of-L up-sampler.

Xu(2) =X(E). (13.5)


Let us examine the implication of the above relation on the unit circle. For z = e J , the above

cquation becomes X(eJ) = X(eJo). Figure 13.7(a) shows the DTFT X(eJ®) that has been assumed
o be a real function of o for convenience. Moreover, the DTFT X(e®) shown is not an even function
has been purposely chosen to
of, implying that x{n] is a complex sequence. The asymmetric response
astrate more clearly the effect of up-sampling.
thus leads to a two-fold repetition
As shown in Figure 13.7(b), a factor-of-2 sampling rate expansion
a factor of 2. This process is called
Ae).indicating that the Fourier transform is compressed by
In the case of a factor-of-L sampling
gung because we get an additional "image" of the input spectrum. in the baseband. Thus, a
cexpansion, there will be L 1 additional images of the input spectrum
-

low-frequency spectrum
does not look like
Um &(e) band-limited to the low-frequency region
a

aterp-sampling because of the insertion of zero-valued samples between the non-zero samples of xu n].
Lowpa
hltering of xu [n] removes the L 1 images and, in effect,
"fills in" -
on the zero-valued samples
nwith
Ex:
interpolated sample values.
dnple 13.4 illustrates the frequency-domain properties of the up-sampler.

EXAMPLE 134 llustration of the Frequency-Domain Properties of the Up-Sampler Using


MATLAB
Toi the effect of up-sampling. use Program 133. The input
is a causal finite-length
we
S
ce Sgate
with a band-limited frequency response generated using the M-file fir2. The input to fir2

Program
13 3.m
Chapter 13: Multirate Digital Signal Processing Fundam.
744

(a)
(e
Image

AAAA 0

(b)
Figure 13.7: Effects of up-sampling in the frequeney domain: (a) input spectrum and (6) output spectrunm for l =

04

-0.220
0 0.45 0.5 1.0 30 40 S0 70
Time index

(a) (b)
esd
sFigure 13.8: (a) Desired magnitude response and (b) corresponding time sequence.

is as follows: length of the sequence is 100, the desired magnitude response vector mag = [0 1
0 01, and the vector of frequeney points freq = [0 0.45 0.5 11. The desired magnitake
response is thus as indicated in Figure 13.8(a). A plot of the middle 61 samples of the signal generatai
is shown in Figure 13.8(6).
The program determines the output of the up-sampler and then plots the input and output spevtra, as
indicated in Figure 139 for L = 5. lt can be seen from this figure that, as evpected, the output speetrm
consists of a factor-of-5 compressed version of the input spectrum followed by L-1 - 4 images.

Frequency Domain Representation of the Down-Sampler


We now derive the relations between the spectra ofthe input and the output of a down-sampler. AppO
the z-transform to the input-output relation given in Eq. (13.2), we arrive at
Sampling
Rate Alte ation Devices 745
81. The
Basic asic

Input spectrum
Output spectrum

0.8

0.3
0.6
.

00
0.4

0.2
02

0.4 0.6 0.8 0.2 0.4 0.6 0.8


0.2

Figure 13.9: MATLAB-generated input and output spectrum of a factor-of-5 up-sampler.

Y() = x[Mn]: (13.6)

of Eq. (13.6) be directly expressed in terms of X(z). To get


The expression on the right-hand side
cannot
the that
sequence Xint n] whose sample values
intermediate are same as
apund this problem, we define
an

that multiples of M and are zeros at other values of n:


ixn] at the values of n are

Xint n= 0,
n=
0, +M, t2M,... (13.7)
otherwise.

Then,

YE)= x[Mn]:" = Xi Mn]:""


-oo
n=-oo

Xn (1/M). (13.8)
i n k]:-k/M =

k=-oob
Now" mi]
2 can be formally related to xn] through Xint "] = cn]x{n). where cn] is defined by

+2M,..
cn] =
= 0 , tM, (13.9)
otherwise.
A
icoe n t representation of cn] is given by (Problem 13.3)

M-1 (13.10)
cn k=0
W
where WM
Se of E
=e-j27/M is the quantity defined in Eq. (5.12). Substituting Xnt ] =
cln]x|n] and making
.(13.10) in the transform of Xint ] , we obtain

Xim(2)= cnlxbnl:"=M 2 (w )xnbea k=0


746 Chapter 13: Multirate Digital Signal Processing undamentals

k=9 (13.11)
The desired input-output relation in the transform domain for a factor-of-M down-sampler is hes
tained by substituting Eq. (13.11) in Eq. (13.8), resulting in ob

M-1

Y)= XEVMW (13.12)


k=0

To understand the implication of the above relation, considera factor-c 2dOwn-sampler with an nput
xn] whose spectrum is as shown in Figure 13.10(a). As before, for convenience, we assume again X(eje
to be a real function with an asymmetric frequency response. From Fq. (13.12), we get

olgm Y(e0) = X(eJo)+ X-elo/2)


(13.13)
The plot of X(eJo/2) is shown by the solid line in Figure 13.10(b). To determine the relation of the
second term in Eq. (13.13) with respect to the first, we observe next that

X(-eo/2) = X(eio-27)/2) (13.14)


indicating that the second term X(ejo/2) in Eq. (13.13) is obtained simply by shifting the first term
X(eJo) to the right by an amount 27, as shown by the dotted lines in Figure 13.10(b). The plots of the
two terms in Eq. (13.13) have an overlap, and hence, in general, the original "shape" of X(eJ®) is lost
when xn] is down-sampled. This overlap causes the aliasing that takes place due to undersampling (ie.
down-sampling). There is no overlap, that is, no aliasing, only if X(ej0) is zero for lol 2 7/2. Note
that Y(e°) in Eq. (13.13) is indeed periodic with a period 27t, even though the stretched version X(e
is periodic with a period 47t. For the general case, the situation is essentially the same, and the relation
between the Fourier transform of the outputand theinput of the factor-of-M down-sampler is given by
M-1
1
Y(eo) =M X(eio-2nk)j M (13.15)
k=0

The above relation implies that Y(e/0) is a sum of M uniformly shifted and stretched versions of X(e).
scaled by a factor 1/M. Aliasing due to a factor-of-M down-sampling is absent if and only if the signal
xn] is band-limited to tn/M, as shown in Figure 13.11 for M =2.
We illustrate the aliasing effect caused by down-sampling in Example 13.5.

EXAMPLE 13.5 Ilustration of the Frequency-Domain Properties of the Down-Sampler Usings


MATLAB
To
investigate the effectwith
of down-sampling, we use Program 134. The input signal is again the
signal
here the
generated using fir2 a triangular magnitude
response, in Figure 13.8(a).
as However,
Program frequency vector has been selected to be freq = [0 0 .42 0.48 1] to ensure that there are no

134.m appreciable signal components above the normalized frequency of 0.5.


n
The plots generated by Program 134 are shown in Figure 13.12. The input spectrum is shown
Figure 13.12(a). Since the input signal is band-limited to r/2, the output spectrum for a down-sampling
factor of M 2 shown in Figure 13.12(b) is
=
nearly of the same shape as the input spectrum, excp
has been stretched by a factor of 2 in frequency and its magnitude is reduced by one-half, as predicted
bythe factor 1/2 inEq. (13.13). On the other hand, the output spectrum for a down-sampling factor ot

M =
3,shown in Figure 13.12(c), shows a severe distortion caused by the aliasing

You might also like