Sei sulla pagina 1di 26

Introduction to Multirate Systems 1

Chapter I

Introduction to
Multirate Systems
Gordana Jovanovic-Dolecek
INAOE, Mexico

This chapter treats the fundamentals of multirate system theory and


includes decimation and interpolation as the basic concepts behind the
changing of the sampling rate. The conversion of the sampling rate by an
integer as well as by a rational number is explained. Also discussed are some
widely used interconnections of upsamplers and downsamplers.

INTRODUCTION
The process of converting the given rate of a signal into a different rate
is called sampling rate conversion. Systems that employ multiple sampling
rates in the processing of digital signals are called multirate digital signal
processing systems.
Sample rate conversion is one of the main operations in a multirate
system. This chapter focuses on the description of sampling rate conversion
in both time and frequency domains.

DECIMATION
The reduction of a sampling rate is called decimation, because the
original sample set is reduced (decimated).
Decimation consists of two stages: filtering and downsampling, as
shown in Figure 1.
We will first consider downsampling and through its description illus-
trate why it is necessary to apply filtering prior to downsampling.

Copyright © 2002, Idea Group Publishing.


2 Jovanovic-Dolecek

Figure 1: Decimation

u(n) x(n) y(m)


h(n) M
Filtering Downsampling

DECIMATION

Figure 2: Downsampling
x(n) y(m)=x(mM)
M
fi f0=fi /M

Downsampling
Downsampling reduces the input sampling rate fi by an integer factor M,
which is known as a downsampling factor. It is customary to use a box with
a down-pointing arrow, followed by the downsampling factor, as a symbol to
represent downsampling, as shown in Figure 2.
The output signal y(m) is called a downsampled signal and is obtained by
taking only every M-th sample of the input signal and discarding all others,
y ( m) = x(mM ) . (1)
To model the downsampling process, it is convenient to divide it into two
steps. The output of the first step is the signal x’(n), which is obtained by
setting all samples whose indices are not integer multiples of M to zero. In the
second step, all zeros that were introduced in the preceding step are now
discarded, and the downsampled signal is obtained.
The downsampling operation is not invertible because it requires setting
some of the samples to zero. In other words, we cannot recover x(n) from y(m)
exactly, but can only compute an approximate value.

Step One
We observe that the sampling rate is not altered during the first step, so
that the signals x(n) and x’(n) have the same sampling rate. The signal x’(n)
can be considered as a multiplication of x(n) with the discrete sampling
function cM(n), where M denotes the downsampling factor
x ' ( n ) = x ( n )c M ( n ) , (2)
where,
1 n = mM
c M ( n) =  ; m = ...,−1, 0 ,1,... . (3)
0 otherwise
Introduction to Multirate Systems 3

The sampling function cM(n) is periodic with period M, and as such can be
represented by the Fourier series expansion (see Oppenheim and Schafer,
1989, pp.515-516),
M −1 j 2πkn
1
c M (n) =
M
∑ C (k )e M (4)
k =0
where C(k) are complex-valued Fourier series coefficients defined by
M −1 − j 2πkn
C (k ) = ∑ cM ( n)e M . (5)
n=0
Substituting (3) into (5) it follows that C(k)=1 for all k. Hence,
j 2πkn
1 M −1 M
c M ( n) = ∑e .
M k =0
(6)

To analyze the frequency representation of the first step of downsampling, let


us now compute the Fourier transform (FT) of the sequence x’(n). Using (2)
we have
∞ ∞
X ' (e jω ) = ∑ x' (n)e − jωn = ∑ x(n)c M (n)e − jωn . (7)
n = −∞ n =−∞
Using the relationship established in (6), the above becomes
∞ M −1 j 2πkn
1
X ' (e jω
) = ∑ x(n)( ∑ e M )e − jωn . (8)
n = −∞ M k =0
Finally, by interchanging the sums in (8), the following expression for X’(ejw)
results in
M −1 ∞ 2πk
1 − jn (ω − )
X ' ( e jω ) =
M
∑ ∑ x ( n )e M . (9)
k =0 n = −∞

Let us now compute the Fourier transform of x(n),



X (e jω ) = ∑ x(n)e − jnω . (10)
n = −∞
Applying the frequency-shift property of FT, we have
2πk ∞ 2πk
j (ω − ) − jn (ω − )
X (e M ) = ∑ x ( n)e M . (11)
n = −∞
4 Jovanovic-Dolecek

Noticing that the expression on the right side of (11) looks like the one given
in (9), we can conclude that
M −1 2πk
1 j (ω − )
X ' (e jω ) =
M
∑ X (e M ). (12)
k =0
Observe that the amplitude is scaled by 1/M and that the replicas of the
input spectrum are introduced at multiples of 2π/M.

Step Two
The zeros previously introduced now have to be eliminated. This
operation does not change the content of the signal x’(n), rather it just
introduces time scaling by a factor of 1/M (samples x’(mM) become y(m)).
Because the operations in time and frequency are inverse to each other,
the frequency scale will be multiplied by M, i.e., the spectrum X’(ejw/M)
becomes Y(ejw), as shown below.
Using the definition of FT for x’(n) we have
ω ∞ ω
j - jn
X ' (e M )= ∑ x ' ( n )e M . (13)
n = −∞
Because x’(n) is nonzero only for n=mM, we can write
∞ ∞
X ' (e jω / M ) = ∑ x' (Mm)e − j (ω / M )mM = ∑ x' ( Mm)e − jωm . (14)
m= −∞ m = −∞

Finally, substituting (1) in (14) and using the definition of FT for y(m) we
arrive at

X ' (e jω / M ) = ∑ y(m)e − jmω = Y (e jω ). (15)
m = −∞
Using (12) we can rewrite (15) as
2πk
1 M −1 j (ω − )
Y (ejMω
) = X ' (e ) = ∑
M k =0

X (e M ). (16)

Sometimes it is more convenient to express the downsampled signal in terms


of its z-transform. For a given sequence x(n), its z-transform is defined as

X ( z) = ∑ x ( n) z − n , (17)
n = −∞
ω
where z is a complex variable, given by z = re j .
Introduction to Multirate Systems 5

It is well known that when it exists, the Fourier transform is simply X(z)
with z = e jω ,
X ( z ) z =e jω = X (e jω ) . (18)
Consequently, we can express the relationship in (16) in terms of the z-
transforms,
M −1 M −1
1 1
Y ( z M ) = X ' ( z) =
M
∑ X ( ze − j 2πk / M ) = M
∑ X ( zWMk ) (19)
k =0 k =0
where
− j 2πk
WMk = e M , k = 0,..., M − 1. (20)

Example 1
To illustrate downsampling in the time domain consider the input signal
shown in Figure 3(a) with the downsampling factor M=2. The corresponding
sampling function for n=0,...,16, is given in Figure 3(b). Figure 3(c) demon-
strates the first step of downsampling where every second sample is set to
zero. In the second step (Figure 3(d)) we eliminate zeros introduced in the
previous step to finally obtain the downsampled singal. Observe that the
downsampled signal is a compressed-in-time version of the input signal.
Let us now consider the frequency domain representation of
downsampling, as shown in Figure 4. During the first step (Figure 4(b)), one
image (M-1=1) is introduced in the interval [0,2π], and the amplitude of the
spectrum is scaled by ½. In the second step, shown in Figure 4(c), the
frequency is scaled by M=2, so, for example, the frequency points 0.2 and 0.5
become 0.4 and 1, respectively.
We can see that the spectrum of the downsampled signal is the input
spectrum stretched by 2. Remember that in the time domain the opposite was
true (the resulting signal was compressed by a factor of 2), because the time
and frequency representations are inverse to each other.

Aliasing
As we have already demonstrated, the individual spectra obtained during
the first step of downsampling are the repeated replicas of the original
spectrum. However, if the original signal is not bandlimited to π/M, the
replicas will overlap (see Figure 4(b)). This overlapping effect is called
aliasing. In order to avoid aliasing, it is necessary to limit the spectrum of the
signal before downsampling to below π/M. This is why a lowpass digital filter
6 Jovanovic-Dolecek

Figure 3: Downsampling in time domain


INPUT SIGNAL SAMPLING FUNCTION
1.2

0.16
1
0.14

0.12 0.8
x(n)
0.1
c2(n) 0.6
0.08

0.06 0.4

0.04
0.2
0.02

0 0
0 2 4 6 8 10 12 14 16 0 2 4 6 8 10 12 14 16
n n
(a) Input signal (b) Discrete sampling function

FIRST STEP SECOND STEP

0.16 0.16

0.14 0.14

0.12 0.12

x'(n) 0.1 y(n) 0.1

0.08 0.08

0.06 0.06

0.04 0.04

0.02 0.02

0 0
0 2 4 6 8 10 12 14 16 0 2 4 6 8 10 12 14 16
n n
(c) First step (d) Second step

(from Figure 1) precedes the downsampler. This filter is called a decimation


or antialiasing filter. The exact filter specifications depend on how much
aliasing, if any, is permitted. Nonetheless, some applications allow a certain
degree of aliasing during downsampling.
The specifications for the lowpass decimation filter are given by (see
Mitra, 2001),
1, ω ≤ ωc / M
H (e jω ) =  , (21)
0, π / M ≤ ω ≤ π
where ωc represents the highest frequency that needs to be preserved.

Properties of Downsampling
Let us first verify that the downsampling is a linear and time-varying
operation. The operation is linear if the principle of superposition holds. That
means that downsampling of the sum of the scaled input signals must be equal
to the scaled sum of the downsampled signals.
Introduction to Multirate Systems 7

Figure 4: Downsampling in frequency domain


FIRST STEP
0.5

0.45

0.4

0.35

0.3
abs(X')

0.25

0.2

INPUT SIGNAL 0.15


1
0.1
0.9
0.05
0.8
0
0.7 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
w/pi
0.6
abs(X)
(b) First step
0.5

0.4

0.3 SECOND STEP


0.5
0.2
0.45
0.1
0.4
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0.35
w/pi

(a) Input signal abs(Y) 0.3

0.25

0.2

0.15

0.1

0.05

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
w/pi

(c) Second step

Figure 5: Superposition principle


a1 a1
X1(z) X1(z) Y1(z)
M

X(z)

M M
Y(z ) Y(z )
Σ M Σ
aN YN(z) aN
XN(z) XN(z)
M

Structure 1 Structure 2
8 Jovanovic-Dolecek

The proof is obvious, so we omit it. Therefore, downsampling is a linear


operation.
Now we examine whether downsampling is a time-varying operation. In
general, if the delay D of the input signal results in the same delay D of the
output signal, the operation is time invariant, otherwise it rendered time-
varying. According to the equation (1) if the input signal is delayed by D,
x(mM − D), (22)
and the downsampled signal will be
mM − D D
y( ) = y (m − ) ≠ y (m − D). (23)
M M
Consequently, the delay in the input signal does not result in the same
delay of the downsampled signal, and we can conclude that downsampling is
a time-varying operation. When D/M is not an integer, the downsampled
signal will have a fractional delay, as (23) shows. This means that the
downsampled signal with no input delay and the downsampled delayed signal
will have a different shape.
Consider the case when the delay is a multiple of the downsampling
factor M, i.e., when D=kM. It easily follows from (23) that the downsampled
signal will be
kM
y (m − ) = y ( m − k ). (24)
M
In this case, the downsampling of the input signal that is delayed by kM,
results in a delayed-by-k version of the original downsampled signal. As we
have already seen, the delay is not the same in the input and the output.
Nonetheless, at the output we do obtain a delayed downsampled version of the
input signal. This means that if a delay is a multiple of the downsampling
factor M, the corresponding downsampled signal will have the same shape as
a downsampled signal with no input delay.

Useful Identities
Three useful identities summarize the important properties associated
with downsampling. The first identity states that the sum of the scaled,
individually downsampled signals is the same as the downsampled sum of
these signals. This property follows directly from the principle of superposi-
tion, as previously discussed.
The second identity (Figure 6) establishes that a delay of M samples
before the downsampler is equivalent to a delay of one sample after the
downsampler (where M represents the downsampling factor).
Introduction to Multirate Systems 9

Figure 6: Second identity


M
X(z) Y(z )
M
X(z) Y1(z ) M
Y(z )
-1
z
-M
M M z

Structure 1 Structure 2

Consider Structure 1 in Figure 6. We see that the input to the downsampler is


X(z) z-M, so that according to (19), the output of Structure 1 is given by
M −1
1
Y (z M ) =
M
∑ X ( zWMk )( zWMk ) −M . (25)
k =0
Using (20) it follows that
WM−kM = 1, (26)
which simplifies the above expression into
1 − M M −1
Y (z M ) = z ∑ X ( zWMk ). (27)
M k =0
We now consider Structure 2 in Figure 6. The output of the downsampler is
(note that z becomes zM after downsampling),
1 M −1

Y1 ( z M ) =
M k =0
X ( zWMk ). (28)

Consequently, the output of this structure is


M −1
1
M M −1
Y ( z ) = ( z ) Y1 ( z ) = z M −M
M
∑ X ( zWMk ). (29)
k =0
Comparing the expressions in (27) and (29), it follows that Structures 1 and
2 in Figure 6 are equivalent.
Figure 7 demonstrates the third identity. The filter G(zM) is called an
expanded filter and is obtained by replacing each delay z-1 of the original filter
G(z) with a delay z-M. In time domain this is equivalent to inserting M-1 zeros
between the original samples of the impulse response.
The identity states that the filtering by the expanded filter followed by
downsampling is equivalent to having downsampling first, followed by the
filtering with the original filter. To confirm this algebraically, consider the
structures shown in Figure 7.
Using (19) and (26) we arrive at the output of the first structure
M −1
1
Y (z M ) =
M
∑ X 1 ( zWMk )
k =0
M −1 M −1
(30)
1 1
=
M
∑ X ( zWMk )G ( z M
WMkM )=
M
∑ X ( zWMk M
)G ( z ).
k =0 k =0
10 Jovanovic-Dolecek

Figure 7: Third identity


M
X1(z) Y1(z )
X(z) M
Y(z ) X(z) M
Y(z )
M
G(z ) M M G(z)

Structure 1 Structure 2

Similarly, using (19), the output of the downsampler in the second


structure is
M −1
1
Y1 ( z M ) =
M
∑ X ( zWMk ) . (31)
k =0
Finally, the output of the second structure is
1 M −1

Y ( z M ) = Y1 ( z M )G ( z M ) =
M k =0
X ( zWMk )G ( z M ) . (32)

Comparing (30) and (32), we can conclude that the two structures in Figure
7 are equivalent.

Polyphase Decimation
We have previously seen that in the decimation structure the filtering
is performed at a higher rate. If we use an IIR filter for antialiasing, we
would have to compute all of the feedback values for each new input value
(Grover and Deller, 1999). On the other hand, FIR filters have no
feedback, so that during the convolution many terms that are not used in
the output signal are needlessly computed. Hence, a more efficient
structure would be if the FIR filtering were performed at a lower sampling
rate. To do this it is necessary to analyze the FIR filter through its
polyphase components.

The Polyphase Filters


If the FIR filter has N coefficients, where N is an integer multiple of
M, we can obtain M different discretely sampled components of the
impulse response. That means that the corresponding z-transform can be
partitioned into M subsignals. For example, for N=12 and M=4 we can
write
Introduction to Multirate Systems 11

N −1
H ( z ) = ∑ h(n) z −n =h(0) z 0 + h(4) z − 4 + h(8) z −8
n =0

+ h(1) z −1 + h(5) z −5 + h(9) z −9


+ h(2) z −2 + h(6) z −6 + h(10) z −10
+ h(3) z −3 + h(7) z −7 + h(11) z −11
= z −0 [h(0) z 0 + h( 4) z − 4 + h(8) z −8 ]
+ z −1[ h(1) z −0 + h(5) z − 4 + h(9) z −8 ]
+ z − 2 [h(2) z −0 + h(6) z − 4 + h(10) z −8 ]
+ z -3 [h(3) z −0 + h(7) z − 4 + h(11) z −8 ]. (33)

This equation can now be rewritten to yield


3
H ( z ) = ∑ z −k H k ( z 4 ), (34)
k =0
where
2
H k ( z ) = ∑ h( 4n + k )( z 4 ) −n ;
4
k = 0,1, 2 , 3 . (35)
n=0
We can generalize the expression (34) to obtain
M −1
H ( z) = ∑ z −k H k ( z M ), (36)
k =0
where
N / M −1
M
H k (z ) = ∑ h(nM + k )( z M ) −n ; k = 0,..., M − 1. (37)
n =0
A realization of H(z) based on the decomposition of (36) is called a
polyphase realization and designates the basis for the polyphase decimation.
The equation (37) represents the polyphase components of the filter. From the
expressions in (33) and (37) we can notice that the polyphase components are
obtained by the left shift of the impulse response by k samples, followed by
discrete sampling. The zero component corresponds to the shift k=0, the first
one to the k=1, and the M-1-th to k=M-1.
12 Jovanovic-Dolecek

By eliminating zeros introduced by discrete sampling, from (37) (recall


that this is the second step of downsampling), we arrive at
N / M −1
H k ( z) = ∑ h(nM + k ) z −n ; k = 0,..., M − 1 (38)
n=0
Notice that the polyphase components in (37) are simply the expanded
polyphase components given by (38). Therefore, the representation in (38)
can be used in the applications of the third identity.
Utilizing the relation (36), the decimation structure from Figure 1 can be
redrawn as in Figure 8(a). Using the first and third identities we obtain a more
efficient version in which both the number of filter operations as well as the
amount of memory required are reduced by a factor of M. This structure is
shown in Figure 8(b). As we can see, the subfilters are polyphase components
(38) of the decimation filter. Also notice that the filtering is now performed
at the lower sampling rate.

Figure 8: Polyphase decimation


U(z) Y(z)
M
H0(z ) M
-1
z
M
H1(z )
-1
z
M
H2(z )
...

...

...

M
HM-1(z )

H(z)
(a)

U(z) Y(z)
M H0(z )
-1
z
M H1(z )
-1
z
M H2(z )
...

...

...

M HM-1(z )

(b)
Introduction to Multirate Systems 13

Note that the delay/downsampler chain has the effect of distributing


consecutive samples among the polyphase filters. Due to this, the structure is
often represented using an input commutator as shown in Figure 9.

INTERPOLATION
The procedure of increasing the sampling rate is called interpolation,
and it consists of two stages: upsampling and filtering (shown in Figure
10). We are going to consider interpolation in detail in both time and
frequency domains.

Upsampling
Upsampling increases the sampling rate by an integer factor L, by
inserting L-1 equally spaced zeros between each pair of samples,
 x(n / L) for n = mL
y ( n) =  (39)
 0 otherwise
where L is called an interpolation factor.
The symbol for this operation is a box with an upward-pointing arrow,
followed by the interpolation factor, as Figure 11 illustrates. As we can see,
the input sampling rate fi is increased L times.
We can observe the following:
1. The process of upsampling does not change the content of the input signal,
and it only introduces the scaling of the time axis by a factor L. (The time

Figure 9: Polyphase decimation with an input commutator


Y(z)
H0 (z )

0 H1 (z )
1
U(z) 2
H2 (z )
M-1
...

...

HM-1(z )

Figure 10: Interpolation


x(m) y(n) u(n)
L h(n)
Upsampling Filtering

Interpolation
14 Jovanovic-Dolecek

Figure 11: Upsampling


x(m) y(n)
L
fi f0=fi L

axis is divided by L). In the frequency domain, according to the principle


of duality, the frequency scale is multiplied by L.
To verify this observation, we will analyze the behavior of the Fourier
transform of a L-fold upsampler.
2. Consequently, the operation of upsampling (unlike downsampling) is
invertible, in other words, it is possible to recover the input signal x(m)
from samples of y(n) exactly.
Using (39), the Fourier transform of y(n) is given by
∞ ∞
Y (e jω
)= ∑ y ( n )e − jωn
= ∑ x(n / L)e − jωnL / L
n = −∞ n = −∞
(40)

= ∑ x(n / L)e − j (ωL )(n / L ) = X (e jωL )
n = −∞

We can notice that only frequency scaling, but no amplitude scaling is


introduced. Why is it the case that in upsampling, unlike in downsampling,
there is no change in the amplitude scale?
In upsampling we simply add zeros between samples, and thus the
sample amplitude of the signal remains unchanged. (Remember that in
downsampling we have set some of the samples of the signal to zero.) On the
other hand, the insertion of zeros results in a new time scaling, and conse-
quently, in a new frequency scaling. This means that a given frequency ω in
X(ejω) is transformed into a new frequency ω/L in Y(ejω). As a result of this
operation, L-1 unwanted images of the input signal spectra are introduced in
the interval [0, 2π].
It is often instructive to describe the process of upsampling in terms of the z-
transform. Using (18) and (40) we obtain z-transform of the upsampled signal
Y ( z) = X ( z L ) . (41)

Example 2
We consider a signal shown in Figure 12(a). By inserting L-1=2 zeros
between each pair of samples, the sampling rate is increased by L=3. The
result of this operation is shown in Figure 12(b).
Figure 13(a) illustrates the spectrum of the input signal, while Figure 13(b)
shows the spectra of the upsampled signal. We can notice that the spectrum
Introduction to Multirate Systems 15

Figure 12: Upsampling in time domain


INPUT SIGNAL UPS AMP LED SIGNAL

0.3 0.3

0.25 0.25

0.2 y(n) 0.2


x(m)

0.15 0.15

0.1 0.1

0.05 0.05

0 0

0 2 4 6 8 10 12 14 16 0 5 10 15 20 25 30 35 40 45
m n

(a) Input Signal (b) Upsampled signal, L = 3

Figure 13: Upsampling in frequency domain


INPUT SIGNAL UPS AMP LED SIGNAL
1 1

0.9 0.9

0.8 0.8

0.7 0.7

0.6 abs(Y) 0.6


abs(X)
0.5 0.5

0.4 0.4

0.3 0.3

0.2 0.2

0.1 0.1

0 0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
w/pi w/pi

(a) Input signal (b) Upsampled signal, L = 3

has no change in amplitude scale and that L-1=2 images are introduced in the
interval [ 0,2π ].

Imaging
The process of upsampling introduces the replicas of the main spectra at
every 2π/L. This is called imaging, since there are L-1 replicas (images) in 2π
(see Figure 13(b)). In order to remove the unwanted image spectra we need
a lowpass filter immediately after upsampling. This filter is called an anti-
imaging filter. In the time domain, the effect is that the zero-valued samples
introduced by upsampling are filled with “interpolated” values. Because of
this property, the filter is also called an interpolation filter.
16 Jovanovic-Dolecek

The specifications for the interpolation filter are given by Mitra (2001)

 L, ω ≤ ωc / L
H (e jω ) =  , (42)
 0, π / L ≤ ω ≤ π
where ωc is the highest frequency that needs to be preserved in the interpolated
signal. Similarly to an anti-aliasing filter, an anti-imaging filter is usually
designed as an FIR filter (Mitra, 2001).
Comparing (21) and (42) we can notice that there is no duality between
the gain of the anti-aliasing filter and the gain of the anti-imaging filter. Why
does an anti-imaging filter have a gain L? The explanation is given in the
following paragraphs.
Assume that x(m) (see Figure 10) has been obtained by sampling a
bandlimited continuous signal xc(t) at the Nyquist rate. The Fourier transform
of the discrete signal X(ejω) is related to the Fourier transform of the
continuous signal Xc(jΩ), (Ω is a continuous frequency), as
1 ∞ ω 2πk ω
X (e jω ) = ∑
Tx k = −∞
Xc( j − j
Tx Tx
); Ω = ,
Tx
(43)

where Tx denotes the sampling period.


In a similar way, we can assume that the interpolated signal u(n) in Figure
10 is also obtained by sampling the same continuous signal with a sampling
period, Ty=Tx/L. Its Fourier transform is related to Xc(jΩ) as
∞ ∞
1 jω 2πk L jωL 2πkL ω
U (e jω ) =
Ty
∑ Xc(
Ty

Ty
)=
Tx
∑ Xc(
Tx

Tx
); Ω = . (44)
Ty
k = −∞ k = −∞

The output signal u(n) has been passed through a low pass filter, and so
only the base spectrum is retained. Therefore, in (44) all spectral components
other than k=0, are eliminated, which gives
L jωL
U ( e jω ) = Xc( ), (45)
Tx Tx
or using (43)
U (e jω ) = LX (e jωL ) . (46)
Because no amplitude scaling was introduced during upsampling, the gain L
in (46) must be compensated for during the filtering stage.

Properties of Upsampling
In this section we will verify that upsampling is a linear and time-varying
operation. The linearity property is illustrated in Figure 14. Since it is
Introduction to Multirate Systems 17

straightforward to verify, we will state without a proof that upsampling is a


linear operation.
We will now consider whether this operation is time-varying. Let us
suppose that the input of the upsampler (Figure 11) has a delay of D samples,
x (m − D) . (47)
The upsampled signal will be
y ((m − D) L) = y (mL − DL) = y (n − DL) ≠ y (n − D) . (48)
Consequently, upsampling is a time-dependent operation. Since the delay DL
is an integer, the upsampled delayed signal and the upsampled signal with no
delay will always have the same shape. Remember that in the case of a
downsampled signal, this relationship holds only when the delay is a multiple
of M.

Useful Identities
We have already seen three useful identities of the downsampled signals,
and now we will state the corresponding identities associated with upsampling.
The fourth identity asserts that the output signals Y1(z),...,YN(z), which are
obtained by upsampling the input signal and then scaling by a1,...,aN, respec-
tively (the first structure in Figure 15) will give the same result as if the signal
is first scaled and then downsampled (see the second structure in Figure 15).
The proof is obvious so we omit it.
The fifth identity states that a delay of one sample before upsampling is
equivalent to the delay of L samples after upsampling (Figure 16).
In the first structure we have:
X 1 ( z L ) = X ( z L )( z L ) −1 . (49)
The output of the first structure yields
Y ( z) = X 1 ( z L ) = X ( z L ) z − L . (50)
At the upsampler output in the second structure it holds that
Y1 ( z ) = X ( z L ) , (51)

Figure 14: Superposition principle


a1 a1
X1(z) X1(z) Y1(z)
L

aN
Σ
X(z)
L
Y(z)
≡ Σ
Y(z)

XN(z) XN(z) YN(z) aN


L

Structure 1 Structure 2
18 Jovanovic-Dolecek

Figure 15: Fourth identity


a1 a1
Y1(z) Y1(z)
L

X(z)
L
aN
≡ X(z)

aN
YN(z) YN(z)
L

Structure 1 Structure 2

Figure 16: Fifth identity

≡ Y1(z) Y(z)
L L L
X(z ) X1(z ) Y(z) X(z ) -L
z
-1
L L z

Structure 1 Structure 2

resulting in
Y ( z ) = Y1 ( z ) z − L = X ( z L ) z − L , (52)
at the output. Since the above expression equals the one given by (50), the
equivalency of the two structures is confirmed.
The sixth identity, which is a more general version of the fifth identity,
states that filtering followed by upsampling is equivalent to having upsampling
first followed by expanded filtering. It is illustrated in Figure 17.
In the first structure (Figure 17) we have
X 1 ( z ) = X ( z )G ( z )
(53)
Y ( z ) = X 1 ( z L ) = X ( z L )G ( z L )
Similarly, from the second structure we obtain
Y1 ( z ) = X ( z L )
(54)
Y ( z ) = Y1 ( z )G ( z L ) = X ( z L )G ( z L )
Since the equations (53) and (54) are identical, the two structures are equivalent.

Polyphase Interpolation
We notice that in the interpolation structure, the filtering is performed
at the higher sampling rate. That means that most of the data values going
into the filter are zero, more precisely L-1 out of every L value. As a
consequence, in the process of convolution there are many unnecessary
multiplications with zero.
Introduction to Multirate Systems 19

Figure 17: Sixth identity


X(zL) X1(z )
L
Y(z) X(z) Y1(z) Y(z)
G(z ) L L G(zL)

Structure 1 Structure 2

The convolution at the higher sampling rate can be replaced by indepen-


dent convolutions at the lower input sampling rate using polyphase decompo-
sition (36). We can simply replace the coefficient M by L to obtain
L −1
H ( z ) = ∑ z −k H k ( z L ) . (55)
k =0
If we express the polyphase filter in the interpolation structure in Figure
10, using the above expression, we obtain the first structure in Figure 18 (a).
Its transpose (see Mitra, 2001, p.352), is shown in Structure 2 in Figure 18(a).
According to the fourth identity, we can place the upsampler into parallel
branches, and then using the sixth identity we can interchange filtering and
upsampling, as illustrated in Figure 18(b). Each input sample is simulta-
neously sent to the subfilters Ho(z),....HL-1(z), where filtering is performed at
the lower sampling rate giving the components Xo(z), ..., XL-1(z). These
components are upsampled (filled with zeros), and then interleaved at the
higher sampling rate using a series of delays, and finally are combined to yield
the output signal.
Some authors also use a commutator in the output to present the
combining of the components Xo(z), ..., XL-1(z) into an output signal. Figure 19
shows a polyphase interpolator with an output commutator.

INTERCONNECTION OF
SAMPLING RATE CONVERTERS
In this section we will discuss some of the widely used interconnec-
tions of upsamplers and downsamplers in the multirate systems. An
interchange of sampling converters can often lead to a computationally
more efficient realization.

Cascade of Sampling Rate Converters


First we consider the cascade of an L-fold upsampler and an L-fold
downsampler, as shown in Figure 20(a).
It is straightforward to conclude that the output is equal to the input.
20 Jovanovic-Dolecek

Figure 18: Polyphase interpolation


H(z) H(z)
L L
X(z ) Y(z) X(z ) Y(z)
L -1
L
H0(z ) L L
H0(z )
z z
-1

L L
H1(z ) H1(z )
-1
z z
-1

H2(z )
L ≡ H2(z )
L

...
...

...

...

...

...
L L
HL-1(z ) HL-1(z )

Structure 1 (a) Structure 2

X(z) X0(z) Y(z)


H0 (z) L
-1
X1(z) z
H1(z) L
-1
z
H2(z) L

...
...

...

XL-1(z)
HL-1(z ) L
(b)
Figure 19: Polyphase interpolator with an output commutator
x0(m)
H0 (z )

x1(m)
H1 (z ) k=0
x(m) 1
x2(m) 2
y(n)
H2(z )
...

...

k=L-1
xL-1(m)
H L-1(z )

Upsampling by a factor L introduces L-1 zeros after each sample of the


input signal, and downsampling by a same factor L removes those zeros,
and the net result is the original signal. If upsampling precedes
downsampling, where both operations have the same factor, namely when
M=L, the signal is not changed.
Now we look at the cascade in Figure 20(b). Does the output signal still
equal the input signal? In the first step of downsampling we set all samples
whose indices are not integer multiples of M to zero, and, then, in the second
step, we remove those zeros. Upsampling by M again introduces those zeros,
and therefore this result corresponds to the first step of downsampling. If
Introduction to Multirate Systems 21

Figure 20: Cascading sampling converters


L L
X(z ) X1(z) Y(z )
L L

(a) Upsampler-downsampler
M
X(z) X1(z ) Y(z)
M M

(b) Downsampler-upsampler

downsampling is performed before upsampling, with the same sampling


factor, the output signal will be different from the input signal, and the
operation will be equivalent to discrete sampling.

Interchanging of the Sampling Rate Converters


We are going to consider whether the operations of downsampling and
upsampling can be interchanged, i.e., whether they are commutative or not.
Structure (a) in Figure 21 shows the operation of downsampling by a factor
of M, followed by upsampling by a factor of L. The question is when we can
perform upsampling by L first, followed by downsampling by M, (Figure 21
(b)) and still obtain the same result. The condition for the equivalency of the
structure (a) and (b) will provide the answer.

Structure (a):
M −1 M −1
1 1
X1 (z M ) =
M
∑ X ( zWMk ); X 1 ( z) =
M
∑ X ( z1/ M WMk )
k =0 k =0
. (56)
M −1
1
Y1 ( z ) = X 1 ( z L ) =
M
∑ X ( z L / M WMk ).
k =0

Figure 21: Interchanging of sampling rate converters


X(z) X1(z) Y1(z)
M L
(a) Downsampler-upsampler

X(z) X2(z) Y2(z)


L M
(b) Upsampler-downsampler
22 Jovanovic-Dolecek

Structure (b):

X 2 ( z) = X ( z L )
M −1 M −1
1 1
Y2 ( z M ) =
M
∑ X 2 ( zWMk ) = M
∑ X ( z LWMkL ) . (57)
k =0 k =0
M −1
1
Y2 ( z ) =
M
∑ X ( z L / M WMkL ).
k =0

Obviously, M-fold downsampler can be interchanged with an L-fold upsampler


if and only if Y1(z)=Y2(z). From (56) and (57) it is clear that this will only occur
when
WMk = WMkL . (58)
This relation holds if and only if M and L are relatively prime, i.e., M and
L do not have any common integer factor except for 1. For the proof, see Suter
(1998).

Example 3
Let us illustrate the former result by letting L=2 and M=3, so that the
sampling factors are relatively prime.
− j 2πk
 k 
W
 3 = e  {
3 ; k = 0, 1, 2 = e − jo ; e − j 2π / 3 ; e − j 4π / 3 }
 
(59)
− j 2πk 2
 2 k 
W
 3 = e 3 ; k = 0, 1, 2 − j0
= e ; e {
− j 4π / 3
; e − j 8π / 3 = e − j 2π / 3 }
 

As expected, two sets in (59) are equivalent. Now we suppose that L=2 and M=4,
i.e., M and L are not relatively prime since M=2L. The corresponding sets are
− jπk
 k 
W
 4 = e  {
2 ; k = 0, 1, 2, 3 = e − j 0 ; e − jπ / 2 ; e − jπ ; e − j 3π / 2 }
  (60)
{W 4
2k
} {
= e − jπk ; k = 0, 1, 2, 3 = e − j 0 ; e − jπ ; e − j 2π ; e − j 3π }
Figure 22: Cascade Upsampler-LTI-Downsampler
LTI
X(z) X1(z) Y1(z) Y(z) X(z) Y(z)
L H(z) L ≡ H0 (z)

Structure 1 Structure 2
Introduction to Multirate Systems 23

Unsurprisingly, two sets in (61) are not equivalent.


In summary, using (56)-(58), M-fold downsampler and L-fold upsampler
can be interchanged if and only if M and L are relatively prime.

Sampling Rate Converters and the LTI System

Upsampler-LTI-Downsampler
We will consider an extended version of the previous structure in Figure
20(a), with an LTI system between converters, as shown in Figure 22.
The analysis of the first structure gives

X 1 ( z) = X ( z L )
Y1 ( z ) = X 1 ( z ) H ( z ) = X ( z L ) H ( z )
1 L −1 1 L −1 1 L −1
Y (z L ) = ∑
L k =0
Y1 ( zWLk ) = ∑ X ( z LWLkL ) H ( zWLk ) = X ( z L ) ∑ H ( zWLk )
L k =0 L k =0
.

1 L −1
Y ( z ) = X ( z )[ ∑
L k =0
H ( z 1/ LW Lk )].

(61)
The factor inside the middle parenthesis in the last equation (61) is a
downsampled filter impulse response (see equation (19)), and thus, according
to (38) is equal to the 0-th polyphase component.
1 L−1
H 0 ( z) = ∑
L k =0
H ( z 1/ LWLk ) . (62)

Using (62) we finally arrive at


Y ( z) = X ( z) H 0 ( z) . (63)
According to the last relation, the cascade in the first structure is
equivalent to the second structure, where the equivalent filtering uses only the
0-th polyphase component (38) of the filter H(z) (the remaining polyphase
components of H(z) are not used). For this reason, the structure is also called
the polyphase identity (Vaidyanathan, 1993). The result is an engaging one
because the upsampler and downsampler are individually time variant sys-

Figure 23: Cascade downsampler-LTI-Upsampler


LTI
X(z) X1(z) Y1(z) Y(z) X(z) X1(z) Y(z)
M H(z) M ≡ M M
M
H(z )

Structure 1 Structure 2
24 Jovanovic-Dolecek

tems, yet the resulting structure is time invariant.

Downsampler-LTI-Upsampler
Let us now analyze the extended version of the structure 20(b), contain-
ing an LTI system between sampling converters, as shown in Figure 23.
Applying the sixth identity, we see that the final output results from
filtering the output of the cascade downsampler/upsampler (discrete sam-
pling) with an expanded filter H(zM), as shown in the equivalent Structure 2
in Figure 23. Therefore, unlike the polyphase identity, this equivalent struc-
ture is now time variant.

Rational Sampling Rate Conversion


Thus far we have discussed changing the sampling rate by integer factors,
decimating by M, or interpolating by L. In this section we consider changing
the sampling rate by a ratio of two integers, L/M. Obviously we can perform
this by cascading decimation by a factor M and interpolation by a factor L.
There are two possible cascade connections depending on what is
performed first, decimation or interpolation, as shown in Figures 24(a) and
(b). In the structure where the interpolation is performed before decimation
(Figure 24(b)), we can notice that the interpolation and the decimation filters
are both lowpass filters operating at the same sampling rate. Thus, they can
be combined into one filter G(z), as shown in Figure 24(c), to yield the desired
structure for the rational sampling rate conversion. The result is shown in
Figure 24 (c).

Figure 24: Rational sampling conversion

X(z) Y(z)
H1(z) M L H2(z)

DECIMATION INTERPOLATION
(a)

X(z) Y(z)
L H1(z) H2(z) M

(b)

X(z) Y(z)
L G(z) M
(c)
Introduction to Multirate Systems 25

Lowpass filter G(z) has a normalized stopband cutoff frequency at


ω s = min(π / L, π / M ) , (64)
which suppresses the imaging caused by upsampling and at the same time
eliminates the aliasing caused by downsampling.
Recently, a new efficient time-varying filter structure for rational
sampling rate conversion was derived in Webb (2000). This new structure
uses a transposed filter structure, and is particularly suitable for DSP
implementations.
An efficient algorithm for the sampling rate conversion from 44.1kHz
compact disc (CD) to 48 kHz digital audio tape (DAT) has been proposed by
Rajamani et al. (2000). The method uses digital interpolation followed by a
fractional delay filter. Another interesting result can be found in a paper by
Russel (2000) where a new rational sampling rate conversion using IIR filters
is presented.

SUMMARY
Reduction of the sampling rate is called decimation, and it consists of two
stages: filtering and downsampling. Downsampling reduces the input sam-
pling rate by an integer factor M, and is a linear and time variant operation. A
downsampled signal is a shortened time, frequency stretched version of the
input signal. To avoid the aliasing, the filtering is introduced to bandlimit the
input signal. Polyphase decimation, which utilizes polyphase components of
a decimation filter, is a preferred structure for decimation because it enables
filtering to be performed at a lower sampling rate.
The procedure of increasing the sampling rate is called interpolation, and
it has two parts, upsampling and filtering. Upsampling increases the input
sampling rate by an integer factor L, by inserting L-1 equally spaced zeros
between each pair of input samples. This operation is a linear and time variant
operation and, unlike downsampling, is invertible. This process introduces
the replicas of the main spectra at every 2π/L, which is called imaging. In order
to remove these images, a lowpass filter must be placed immediately after
upsampling. A more efficient interpolation structure is obtained by using the
polyphase components of the interpolation filter, so that the filtering is
performed at lower sampling rate.
If upsampling precedes downsampling, where both operations have the
same factor, namely M=L, the input signal is not changed. However, if
downsampling is performed before upsampling, with the same factor L=M,
the equivalent operation corresponds to the first step of downsampling, and
thus the output signal is different from the input signal.
26 Jovanovic-Dolecek

M-fold downsampler and L-fold downsampler can be interchanged if and


only if M and L are relatively prime.
The cascade Upsampler-LTI system–Downsampler is equivalent to
filtering with the 0-th polyphase component of the LTI, and is called the
polyphase identity. Even though both the upsampler and downsampler are
time variant, the resulting structure is time invariant.
On the other hand, the cascade Downsampler-LTI-Upsampler is time
variant, and is equivalent to discrete sampling with an expanded filter.
Rational sampling conversion can be efficiently performed as a cascade
of upsampling and downsampling, where the interpolation and decimation
filters are combined into one filter.
MATLAB programs which illustrate Chapter 1 are available from the
Web site http://www.inaoep/electronica.

REFERENCES
Burrus C. S., McClellan J. H., Oppenheim, A. O., Parks, T. W, Schafer, R. W. and Schuessler
H. W. (1994). Computer-Based Exercises for Signal Processing Using MATLAB.
New Jersey: Prentice Hall, Inc.
Crochiere R. E. and Rabiner L. R. (1983). Multirate Digital Signal Processing. New Jersey:
Prentice Hall, Inc.
Dabrowski, A. (1997). Multirate and Multiphase Switched-Capacitor Circuits. London:
Chapman & Hall.
Fliedge, N. J. (1995). Multirate Digital Signal Processing. Chichester: The McGraw-Hill
Companies, Inc.
Grover, D. and Deller, J. R. (1999). Digital Signal Processing and the Microcontroller. New
Jersey: Prentice Hall, Inc.
Haddad, R. A. and Parson T. W. (1991). Digital Signal Processing: Theory, Applications,
and Hardware. New York: W. H. Freeman and Company.
Mitra, S. K. (2001). Digital Signal Processing: A Computer-Based Approach, (Second edition).
New York: The McGraw-Hill Companies, Inc.
Oppenheim, A. V. and Schafer, R. W. (1989). Discrete-Time Signal Processing. New
Jersey: Prentice-Hall, Inc.
Orfanidis, S. J. (1996). Signal Processing. New Jersey: Prentice Hall, Inc.
Rajamani K., Lai Y. S. and Farrow C. W. (2000). Efficient algorithm for sample rate
conversion from CD to DAT. IEEE Signal Processing Letters, October 10, 7, 288-
290.
Russel A, I. (2000). Efficient rational sampling rate alteration using IIR filters. IEEE Signal
Processing Letters, January 1, 7, 6-7.
Stearns, S. D. and David, R. A. (1996). Signal Processing Algorithms in MATLAB. New
Jersey: Prentice Hall, Inc.
Suter, B. W. (1998). Multirate and Wavelet Signal Processing. San Diego: Academic Press.
Vaidyanathan, P. P. (1993). Multirate Systems and Filter Banks. New Jersey: Prentice Hall,
Inc.
Webb, J. L. H. (2000). Transposed FIR filter structure with time-varying coefficients for
digital data resampling. IEEE Transactions on Signal Processing, September 9, 48,
2594-2600.

Potrebbero piacerti anche