Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Chapter I
Introduction to
Multirate Systems
Gordana Jovanovic-Dolecek
INAOE, Mexico
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.
Figure 1: Decimation
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)
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
jω
X (e M ). (16)
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
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
0.16 0.16
0.14 0.14
0.12 0.12
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
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
0.45
0.4
0.35
0.3
abs(X')
0.25
0.2
0.4
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
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
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
≡
M
X(z) Y(z )
M
X(z) Y1(z ) M
Y(z )
-1
z
-M
M M z
Structure 1 Structure 2
≡
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
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.
N −1
H ( z ) = ∑ h(n) z −n =h(0) z 0 + h(4) z − 4 + h(8) z −8
n =0
...
...
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
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
0 H1 (z )
1
U(z) 2
H2 (z )
M-1
...
...
HM-1(z )
Interpolation
14 Jovanovic-Dolecek
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
0.3 0.3
0.25 0.25
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
0.9 0.9
0.8 0.8
0.7 0.7
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
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)
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
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)
aN
Σ
X(z)
L
Y(z)
≡ Σ
Y(z)
Structure 1 Structure 2
18 Jovanovic-Dolecek
X(z)
L
aN
≡ X(z)
aN
YN(z) YN(z)
L
Structure 1 Structure 2
≡ 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
≡
X(zL) X1(z )
L
Y(z) X(z) Y1(z) Y(z)
G(z ) L L G(zL)
Structure 1 Structure 2
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.
L L
H1(z ) H1(z )
-1
z z
-1
H2(z )
L ≡ H2(z )
L
...
...
...
...
...
...
L L
HL-1(z ) HL-1(z )
...
...
...
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 )
(a) Upsampler-downsampler
M
X(z) X1(z ) Y(z)
M M
(b) Downsampler-upsampler
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
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
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
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)
Structure 1 Structure 2
24 Jovanovic-Dolecek
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.
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
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
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.