Multirate Signal Processing
Multirate Signal Processing
Multirate Signal
Processing
In a software defined radio, one often has to deal with sampled wideband
signals that contain a multitude of different user signals. Part of the re-
ceiver’s task is thus to extract the desired user signal(s) from such a wide-
band signal. In such cases, the receiver may consist of multiple stages of
down conversion and filtering. After each down conversion and filtering
stage, the output signal has a lower Nyquist frequency than the input.
Thus, it may be decimated before any further processing. As a result, one
has to deal with signal processing scenarios where signals with multiple
rates are to be dealt with. This chapter discusses the signal processing
issues that are pertinent to such scenarios.
The most basic blocks in multirate signal processing are M -fold deci-
mator and L-fold expander. These along with their impact on the resulting
signal spectra are introduced in Section 5.1. Section 5.2 is devoted to
rate-conversion. Through interconnection of decimators/expanders and fil-
ters, we develop multirate signal processing structures that allow digital
resampling of sampled signals to virtually any arbitrary rate. The rules
governing the interconnection of signal processing blocks in multirate sys-
tems are reviewed in Section 5.3. Building on the results of Section 5.3,
efficient structures for realization of multirate systems, known as polyphase
filters, are introduced in Section 5.4. Multistage implementation, a pow-
erful multirate technique for minimization of the complexity of multirate
systems, is reviewed in Section 5.6. Cascaded integrator-comb (CIC) filters,
a class of very low-complexity (multiplier-free) filters for interpolation and
decimation, are introduced in Section 5.7. Some example applications of
multirate signal processing techniques are presented in Section 5.8.
99
100 Multirate Signal Processing Chap. 5
x [n] ↓M xd [n]
x [n] −2 3
−3 −1 0 1 2 n
xd [n] −1
0 1 n
Let
x[n], n = multiples of M
x1 [n] = (5.3)
0, otherwise
Sec. 5.1 M -fold Decimator and L-fold Expander 101
and note that since xd [n] = x[M n] = x1 [M n], from (5.2) we obtain
∞
Xd (z) = x1 [M n]z −n
n=−∞
∞
= x1 [n]z −n/M
n=−∞
∞ −n
= x1 [n] z 1/M
n=−∞
= X1 (z 1/M ) (5.4)
where the second equality follows because x1 [n] is zero unless n is a multiple
of M .
Next, we find the relationship between Xd (z) and X(z). For this, we
note that
x1 [n] = CM [n]x[n] (5.5)
where CM [n] is the comb sequence defined as
1, n = multiples of M
CM [n] = (5.6)
0, otherwise.
Also, we note that
M −1
1 j2πkn/M
CM [n] = e . (5.7)
M
k=0
∞
Substituting (5.7) in (5.5) and the result in X1 (z) = n=−∞ x1 [n]z −n , we
obtain
M −1 ∞
1
X1 (z) = x[n]ej2πkn/M z −n
M n=−∞
k=0
1
M
−1 ∞
−n
= x[n] ze−j2πk/M
M
k=0 n=−∞
1
M
−1
= X ze−j2πk/M . (5.8)
M
k=0
1 1/M −j2πk/M
M −1
Xd (z) = X z e . (5.9)
M
k=0
Figure 5.3(b) gives a graphical presentation of this result, for the case where
the decimation factor M = 2 and X(ej2πf ) is as shown in Figure 5.3(a).
We note that M -fold decimation in the time domain changes the signal
spectrum in two ways. (i) The spectrum gets expanded M times across the
frequency axis. (ii) The magnitude of the spectrum decreases M times.
X (e j2 πf )
A
−2 −1 1 2 f
(a)
1 1
Xd (e j2 πf ) = X(ej2πf /2 ) + X(ej2π(f −1)/2 )
2
2
A/2
−2 −1 1 2 f
(b)
x [n] ↑L xe [n]
x [n] −2
−1 0 1 2 n
xe [n] −4
−5 −3 −2 −1 0 1 2 3 4 5
n
X (e j2 πf )
−2 −1 1 2 f
(a)
Xe (e j2 πf ) = X (e j4 πf )
−2 −1 .5 −1 −0 .5 0 .5 1 1 .5 2 f
(b)
Because of (5.11), xs (t) and xse (t) are effectively the same signals and,
hence, they have the same spectrum. However, since the sampling rate
in xse (t) is L times larger than the sampling rate in xs (t), the absolute
frequency corresponding to the normalized frequency f = 1 in Xe (ej2πf )
is L times larger than its counterpart in X(ej2πf ) and, accordingly, within
each cycle 0 ≤ f ≤ 1 of Xe (ej2πf ), L repetitions of X(ej2πf ) are observed.
∞
xs (t) = x[n]δ(t − nTs )
n=−∞
The reason why the setup of Figure 5.7 works can best be explained
in the frequency domain by presenting the spectra of the signal sequences
x[n], xe [n] and x [n]. These are presented in Figures 5.8(a), (b) and (c),
respectively. To emphasize the sampling rate of each signal, the frequency
axes are scaled to the actual frequencies in Hertz (and not the normalized
frequencies). The figures are self-explanatory and clearly indicate how the
cascade of the L-fold expander and the lowpass filter increases the sampling
rate L-fold without changing the spectrum of the desired signal.
Clearly, the lowpass filter should have a passband that covers the desired
signal bandwidth B, and it should have a stopband that begins from the
point where the first replica of the signal spectrum begins. A particular
and attractive choice of the lowpass filter here is a Nyquist (M) filter with
M = L. This is attractive because it assures that the equality x [Ln] = x[n]
holds exactly, i.e., the original samples x[n] will appear at the interpolator
output.
106 Multirate Signal Processing Chap. 5
X (e j2 πf /fs )
−fs −B B fs f
(a)
Xe (e j2 πf /Lfs )
··· ···
−Lfs −fs −B B fs Lfs f
(b)
X (e j2 πf /Lfs )
Picked by the lowpass filter Deleted by the lowpass filter
··· ···
−Lfs −fs −B B fs Lfs f
(c)
Figure 5.8: Spectra of the signal sequences x[n], xe [n] and x [n] of Fig-
ure 5.7.
Sec. 5.2 Rate Conversion 107
When the bandwidth of x[n] is not small enough and direct down-
sampling causes aliasing, prior to down-sampling, x[n] should be passed
through a lowpass filter with sufficiently small bandwidth to avoid aliasing,
as in Figure 5.9. Clearly, in such cases, the process of resampling results
in a loss of part of the spectrum of x[n] and thus x[n] cannot be recovered
from x [n].
Figure 5.9: M -fold decimator. The lowpass filter is to avoid aliasing after
down-sampling.
Example 5.1:
The samples of x(t) = sin(2πt) + 2 cos(4πt) at the rate of 6 samples per
second are available. Develop a MATLAB program that takes these sam-
ples as input and generates samples of x(t) at the rate 9 (= 32 × 6) as
output.
Solution:
We should follow Figure 5.10 with L = 3 and M = 2. With fs = 6 Hz, the
first and second components in x(t) has the normalized frequencies ±1/6
and ±2/6 = ±1/3. After the L = 3 fold expander, these frequencies will
divide by L and within the range of normalized frequency 0 to 0.5 three
replicas of them will appear. These are shown in Figure 5.11. The lowpass
filter should be chosen such that it only allows the frequency components
at ±1/18 and ±1/9 pass through and the rest of the components are
rejected. A MATLAB script that contains the following lines generates
x in from x(t) at the rate of 6 samples per second as input and does the
desired 3/2-fold rate change and deliver x out. It also plots the results
shown in Figure 5.12 and 5.13
Most of this script is self-explanatory. The reader should also take note of
the following points:
• In line 5, ‘h’ is a lowpass filter with proper band edges to select the
first two spectral lines of Figure 5.11.
• To recover the signal samples at the filter output at the correct level
the passband gain of ‘h’ is set equal to L = 3. Problem 2 guides you
to develop an understanding of this point.
1.5
1
Xe(ej2Sf)
0.5
0
0 0.1 0.2 0.3 0.4 0.5
f
1
in
0
x
1
2
3
0 1 2 3 4 5
t
1
out
0
x
1
2
3
0 1 2 3 4 5
t
but
y2 [n] = x[n], for all n.
This shows that, when L = M , the M -fold decimator and L-fold expander
blocks are not commutable. On the other hand, if we consider the case
where M = 3 and L = 2, it is not difficult to find that both y1 [n] and y2 [n],
for n = 0, 1, 2, · · ·, contain the elements
which means the commutative rule is applicable in this case. The general
rule here is that the M -fold decimator and L-fold expander can be commu-
tated only when M and L are prime with respect to each other. This can
Sec. 5.3 Commutative Rules 111
1 L/M −j2πk/M
M −1
Y1 (z) = X z e
M
k=0
and
1 L/M −j2πkL/M
M −1
Y2 (z) = X z e ,
M
k=0
x [n] ↓M ↑L y1 [n]
(a)
x [n] ↑L ↓M y2 [n]
(b)
Figure 5.14: Cascading decimator and expander blocks. Here, the commu-
tative rule is not applicable, in general.
Figures 5.15(a) and (b) show how a unit delay z −1 has to be modified
when it is moved from the output of a decimator to its input, and how it
should be modified when it is moved from the input of an expander to its
output, respectively. These two rules can be confirmed easily as follows.
In Figure 5.15(a), y1 [n] = p[n − 1] and p[n] = x[M n]. Hence, y1 [n] =
x[M n − M ]. On the other hand, q[n] = x[n − M ] and y2 [n] = q[M n]. This
implies that y2 [n] = x[M n − M ] = y1 [n].
In Figure 5.15(b), p[n] = x[n − 1] and
p[n/L], n = multiples of L
y1 [n] =
0, otherwise
x[n/L − 1], n = multiples of L
=
0, otherwise
x[(n − L)/L], n = multiples of L
=
0, otherwise
On the other hand,
x[n/L], n = multiples of L
q[n] =
0, otherwise
112 Multirate Signal Processing Chap. 5
and
x[(n − L)/L], n = multiples of L
y2 [n] = q[n − L] = = y1 [n].
0, otherwise
(a)
x [n] p[n] y1 [n] x [n] q[n] y2 [n]
z −1 ↑L ≡ ↑L z −L
(b)
1 1/M −j2πk/M
M −1
P (z) = X z e ,
M
k=0
and, thus,
1 1/M −j2πk/M
M −1
Y1 (z) = P (z)G(z) = X z e G(z). (5.17)
M
k=0
1 1/M −j2πk/M
M −1
Y2 (z) = Q z e
M
k=0
M
−1 M
1 1/M −j2πk/M
M −1
= X z e G(z) = Y1 (z). (5.18)
M
k=0
Sec. 5.4 Commutative Rules 113
(a)
x [n] p[n] y1 [n] x [n] q[n] y2 [n]
G(z ) ↑L ≡ ↑L G(z L )
(b)
Finally, the set of commutative rules that are presented in Figure 5.17
are also found useful in the development of multirate systems. The rules
presented in Figure 5.17 are for M -fold decimators. The rules are applicable
when M -fold decimators are replaced by L-fold expanders. These rules can
be verified trivially.
a a
x [n] ⊗ ↓M ≡ x [n] ↓M ⊗
x1 [n] x1 [n] ↓M
⊕ ↓M ≡ ⊕
x2 [n] x2 [n] ↓M
x1 [n] x1 [n] ↓M
⊗ ↓M ≡ ⊗
x2 [n] x2 [n] ↓M
H(z) = E0 (z 2 ) + z −1 E1 (z 2 )
where
∞
Ek (z) = h[nM + k]z −n . (5.21)
n=−∞
where
Rk (z) = EM −1−k (z). (5.23)
This is called Type 2 polyphase representation of H(z) (with respect to M )
and Rk (z) is the respective kth polyphase component.
Sec. 5.5 Efficient Structures for Decimation and Interpolation 115
1 1 + x + · · · + xM −1
=
1−x 1 − xM
whose application leads to
1 αl αlM −1
Hl (z) = + z −1 + · · · + z −(M −1)
1 − αlM z −M 1 − αlM z −M 1 − αlM z −M
(5.24)
from which we obtain
αlk
El,k (z) = . (5.25)
1 − αlM z −1
x [n]
N −1 y[n]
H (z ) = h[n]z −n ↓M
n=0
(a)
x [n] x [n]
E0 (z M ) ↓M E0 (z )
z −1 z −1
E1 (z M ) ↓M E1 (z )
⊕ ↓M
y[n]
⊕ y[n]
z −1 z −1
EM −1 (z M ) ↓M EM −1 (z )
(b) (c)
x [n]
z −1 z −1 z −1
⊕ y[n]
↓M
N −1
x [n] h[n]z −n
y[n]
↑L H (z ) =
n=0
(a)
x [n] x [n]
↑L R0 (z L ) R0 (z ) ↑L
−1
z z −1
↑L R1 (z L ) ⊕ R1 (z ) ↑L ⊕
z −1 z −1
y[n] y[n]
↑L RL−1 (z L ) ⊕ RL−1 (z ) ↑L ⊕
(b) (c)
output samples. More specifically, one may store samples of x[n] in part of
the memory and coefficients of each polyphase filter in a separate part of the
memory. Then, following the structure of Figure 5.21 (explained below),
the outputs of the polyphase filters RL−1 (z), RL−2 (z), · · ·, and R0 (z) are
calculated, respectively, and sent to the output in the same order.
x [n] y0 [n]
R0 (z )
y1 [n]
R1 (z )
y[n]
yL−1 [n]
RL−1 (z )
The same concept may also applied to the decimator polyphase struc-
ture of Figure 5.18(c) to remove the delay line and the M -fold decimators,
120 Multirate Signal Processing Chap. 5
and pass the input samples through a commutator to the polyphase filters
E0 (z), E1 (z), · · ·, EM −1 (z). This is presented in Figure 5.22.
x [n]
E0 (z )
x [n − 1 ]
E1 (z )
x [n]
⊕ y[n]
EM −1 (z )
x [n − M + 1 ]
x [n] y0 [n]
R0 (z )
y1 [n]
R1 (z )
y[n]
↓M
yL−1 [n]
RL−1 (z )
(a)
x [n] y0 [n]
R0 (z )
y1 [n]
R1 (z )
y[n]
(b)
When L/M < 1, the structure of Figure 5.23 becomes inefficient (especially,
for smaller values of L/M ), even when a software implementation is desired.
This is because the polyphase filters have to still cope with the input rate
which in the present case is higher than the output rate. A structure that
allows operation of the system components (polyphase filters) at the output
rate clearly leads to a more efficient structure.
Here, in analogy with Figure 5.23(a), to have polyphase filters that
operate at the output rate, we may suggest the alternative structure of
Figure 5.24. Examination of this structure soon reveals that, because of
the L-fold expander, L − 1 out of every L input samples to the polyphase
filters E0 (z), E1 (z), · · ·, EM −1 (z) are zero and therefore a large number of
unnecessary multiplications by zero have to be performed. To discuss how
one may avoid zero samples, without any loss of generality, we limit our
discussion to the simple case where L = 2 and M = 3.
E0 (z )
E1 (z )
x [n]
↑L ⊕ y[n]
EM −1 (z )
Figure 5.25(a) presents a redrawn of Figure 5.24, for the case where
L = 2 and M = 3 and the commutator is replaced by delay units and 3-
fold decimators (compare with Figure 5.18(c)). This figure can be further
rearranged as Figure 5.25(b). In obtaining this figure, we have noted that
since 2 and 3 are prime with respect to each other, the blocks ↑ 2 and ↓ 3
in the top branch commute. In the lower branch, we have used the first
noble identity and moved z −2 before ↑ 2 and then commuted ↓ 2 and ↑ 3.
For the middle block, we have noted that z −1 = z 2 × z −3 , then used the
noble identity 1 to move z 2 before ↓ 2 and the noble identity 2 to move
z −3 after ↑ 3 and then commuted the blocks ↓ 2 and ↑ 3. Finally, we note
that the blocks within the dashed box A can be replaced by a clockwise
commutator. Moreover, the blocks within each of B boxes can be efficiently
implemented using (2-fold) interpolation polyphase structures. This final
Sec. 5.6 Efficient Structures for Decimation and Interpolation 123
step gets rid of zero samples in the tapped delay lines of the polyphase
filters.
x [n]
↑2 ↓3 E0 (z )
↑2 z −1 ↓3 E1 (z )
⊕ y[n]
↑2 z −2 ↓3 E2 (z )
(a)
A B
x [n]
↓3 ↑2 E0 (z )
⊕
B
y[n]
z ↓3 ↑2 z −1 E1 (z )
B
z −1 ↓3 ↑2 E2 (z )
(b)
x [n] y[n]
↑M H (z ) ↓M (a)
x [n] y[n]
≡ E0 (z ) (b)
Figure 5.26: The polyphase identity: (a) A strange structure. (b) Its equiv-
alent structure.
|H (e j2 πf )|
(a) 0 .5 f
|G(e j2 πf )|
(b) 0 .5 f
|G(e j8 πf )| |I (e j2 πf )|
0 .25 0 .5 f
(c)
|G(e j8 πf )I (e j2 πf )|
(d ) 0 .5 f
Figure 5.27: The response of a narrowband filter and a method of its real-
ization through IFIR technique.
126 Multirate Signal Processing Chap. 5
that is four times wider than the transition band of the desired response.
It thus can be realized with four times less coefficients. I(z) also can be
realized with relatively small number of coefficients, because of its very
relaxed transition band. Accordingly, the computational complexity of the
cascade of G(z 4 ) and I(z) may be only slightly more than one quarter of
the complexity of H(z).
The terminologies
It is instructive to think of the cascade of G(z 4 ) and I(z) as an interpolation
process. Replacement of G(z) by G(z 4 ), in the time domain, is equivalent
of inserting 3 zeros after every sample of the sequence g[n]. This, in the fre-
quency domain, as noted above, is equivalent of compressing the frequency
response G(ej2πf ) along the frequency axis four times; see also the discus-
sion in Section 5.2.1. I(z), then, acts as an interpolation (lowpass) filter
and replaces the zeros of G(z 4 ) by the right values such that G(z 4 )I(z)
has a response that resembles the desired response H(z). Accordingly, I(z)
is called interpolation filter and the terminology IFIR follows for obvious
reasons. The filter G(z) is called model filter.
Ripple sizes
We may note that the size of ripples in the passband of G(z 4 )I(z) is deter-
mined by the ripple size in the passbands of both G(z 4 ) (which is the same
as that of G(z)) and I(z). In the worse case, it is given by the summation
of the ripple sizes in the two filters. So, if a desired passband ripple of
δ1 is desired, we may simply design G(z) and I(z) for the passband ripple
sizes of δ1 /2. The stopband ripple size of G(z 4 )I(z) on the other hand
is determined by the minimum of the stopband ripple sizes of G(z) and
I(z). Hence, if a desired stopband ripple δ2 is required, we will design both
G(z) and I(z) for the stopband ripple size of δ2 . The example given below
clarifies these points further.
Interpolation factor
The example presented in Figure 5.27 arbitrarily assumed an interpolation
factor M = 4. Obviously, one could try other values of M as well. An
important question to ask here is thus what is the optimum interpolation
factor M that minimizes the complexity of the interpolated filter. To find
an answer to this question, we may note that increasing the interpolation
factor increases the width of the transition band of G(z), and thus, G(z M )
could be realized by smaller number of coefficients. On the other hand,
increasing M results in more densely populated images in the response of
G(z M ) and accordingly one will find that an interpolation filter I(z) with
narrower transition band has to be designed. This increases the complexity
of realization of I(z). Therefore, M should be chosen to strike a balance
Sec. 5.6 Multistage Implementation 127
20 20
G(z) I(z)
0 0
20 20
dB
dB
40 40
60 60
80 80
100 100
0 0.1 0.2 0.3 0.4 0.5 0 0.1 0.2 0.3 0.4 0.5
f f
(a) (b)
20 20
9 9
G(z ) G(z )I(z)
0 0
20 20
dB
dB
40 40
60 60
80 80
100 100
0 0.1 0.2 0.3 0.4 0.5 0 0.1 0.2 0.3 0.4 0.5
f f
(c) (d)
One may also note that it is possible to apply the concept of IFIR design
to any filter, including the model filter G(z). In particular, we may start
with a small interpolation factor M , decide on the required specifications of
G(z) and proceed with an IFIR design for G(z). This is left as an exercise
at the end of the chapter.
x [n] y[n]
↑L H (z )
(a)
x [n] y[n]
↑ L1 ↑ L2 G(z L2 ) I (z )
(b)
x [n] y[n]
↑ L1 G(z ) ↑ L2 I (z )
(c)
may be used to reduce the number of multiplications by up to a factor of one half. Here,
for the simplicity of the discussion, we have not considered this point.
130 Multirate Signal Processing Chap. 5
Solution:
Substituting the specified parameters in Kaiser’s formula, we obtain NH =
1267. Accordingly, the direct implementation of H(z), on average, requires
1267
100
= 12.67 additions and 1267+1
100
= 12.68 multiplications per output
sample.
With L2 = 50, the band edges of G(z) should be set at f1 = 0.002L2 =
0.1 and f2 = 0.004L2 = 0.2. Also, as in Example 5.2, we should choose
δ1 = 0.01/2 = 0.005 and δ2 = 0.001. Substituting these in Kaiser’s for-
mula, we obtain NG = 27. For I(z), we find the parameters f1 = 0.002
and f2 = 1/50 − 0.004 = 0.016, δ1 = 0.01/2 = 0.005 and δ2 = 0.001. Using
these, we get NI = 196.
Using the above results, the multistage implementation, on average,
requires 196
50
27
+ 100 = 4.19 additions and 196+1
50
+ 27+1
100
= 4.22 multiplications
per output sample. A three fold reduction in the computational load.
x [n] y[n]
H (z ) ↓M
(a)
x [n] y[n]
I (z ) G(z M1 ) ↓ M1 ↓ M2
(b)
x [n] y[n]
I (z ) ↓ M1 G(z ) ↓ M2
(c)
−z −KL −z −KL z −1 z −1
x [n] y[n]
↑L ⊕ ⊕ ⊕ ⊕
N stages of comb filters N stages of integrators
Figure 5.31: A CIC interpolator with N stages of comb filters and the same
number of integrators. (Initial structure)
0
(f B)/L (f +B)/L (2f B)/L (2f +B)/L
s s s s
10
N=1
20
Normalized |H(e )|, dB
30 N=2
B/L
jSf
40
50
60
N=4
70
80
90
100
0 0.1 0.2 0.3 0.4 0.5
f
the band where images of the expanded signal exist. We may also note that
by increasing N , the bandwidths and attenuation level of the filter nulls
increase and thus results in better cancelation of the signal images. The
fact that the signal images coincide with the nulls of H(z) is a consequence
of the use of an integer K. With K = 2 the images happen at the alternate
nulls of H(z). Another observation in Figure 5.32 is that when B/L is
not sufficiently small, the passband of the CIC filter may suffer from a non-
negligible distortion. Such distortion may be compensated by pre-distorting
the signal spectrum prior to interpolation. The reader is encouraged to
explore further these properties of the CIC interpolator.
The CIC interpolator of Figure 5.31 can be further simplified by using
the second noble identity to switch the position of the L-fold expander and
the comb filters. This results in the structure shown in Figure 5.33. The
advantages brought by this structure are L-fold improvement both with
respect to the delay sizes and the operating frequency of the adders since:
(i) the delay size in each comb filter is reduced from KL to K and (ii)
the comb filters are run at the input rate which is L times slower than the
output rate.
−z −K −z −K z −1 z −1
x [n] y[n]
⊕ ⊕ ↑L ⊕ ⊕
N stages of comb filters N stages of integrators
Figure 5.33: A CIC interpolator with N stages of comb filters and the same
number of integrators. (Simplified structure)
z −1 z −1 −z −K −z −K
x [n] y[n]
⊕ ⊕ ↓M ⊕ ⊕
N stages of integrators N stages of comb filters
Figure 5.34: A CIC decimator with N stages of integrators and the same
number of comb filters.
2
correct sampling
1.5
incorrect sampling
0.5
amplitude
0.5
1
1.5
2
0 2 4 6 8 10 12 14
time
Prior to the era of all-digital data modems, timing (and carrier) recov-
ery was performed using mostly analog circuits. Figure 5.36(a) presents
a schematic diagram that high-lights the timing control mechanism of a
modem of 1960/70s. Here, the timing control for the sampling clock is gen-
erated through manipulation of analog signals. Later as progress was made
in digital circuits, it became more cost-effective to obtain timing control
from processing of the sampled signals using signal processing techniques.
136 Multirate Signal Processing Chap. 5
Sampling
Timing control Clock
(a)
Sampling
Clock Timing control
(b)
Sampling
Timing control
Clock
(c)
We note that the desired output sequence, y[n], is a subset of the in-
terpolated sequence, x1 [n]. The rest of the samples of x1 [n] are redundant
and thus their computation should be avoided. We thus proceed with mod-
ification of the structure of Figure 5.37 such that the computation of these
redundant samples be avoided.
Let Δ = kL+l, where k = 0, 1, · · · , P −1 and l = 0, 1, · · · , L−1. Clearly,
these choices of k and l allows Δ to vary in the desired range of 0 and LP −1.
Substituting Δ = kL + l in Figure 5.37, we can separate the delay block
z −Δ into the cascade of the delay blocks z −l and z −kL . Moreover, if we
separate the decimator block ↓ LP into the cascade of the decimator blocks
↓ L and ↓ P , we obtain the structure of Figure 5.38(a). Next, by applying
the first noble identity (of Figure 5.16), this structure is converted to the
one shown in Figure 5.38(b). Now, if we recall the polyphase identity that
was discussed in Section 5.5.5, the first three blocks in Figure 5.38(b) may
be replaced by the zeroth polyphase component of z −l H(z). For l = 0,
z −l H(z) = H(z) and, thus, the zeroth polyphase component of z −l H(z) is
E0 (z). When l = 0, we begin with the expansion
H(z) = E0 (z L ) + z −1 E1 (z L ) + · · · + z −m Em (z L ) + · · · + z −(L−1) EL−1 (z L ).
(5.30)
Multiplying both sides of (5.30) by z −l , we obtain
z −l H(z) = z −l E0 (z L ) + z −l−1 E1 (z L ) + · · · + z −l−m Em (z L )
+ · · · + z −l−(L−1) EL−1 (z L ). (5.31)
Letting l + m = L, or m = L − l, (5.31) may be rearranged as
z −l H(z) = z −L EL−l (z L ) + z −1 z −L EL+1−l (z L ) + · · ·
+z −(l−1) z −L EL−1 (z L ) + z −l E0 (z L ) + · · · + z −(L−1) EL−l−1 (z L ). (5.32)
This shows that the zeroth polyphase component of z −l H(z) is equal to
z −1 EL−l (z). Substituting this in place of the first three blocks of Fig-
ure 5.38(b), we obtain the structure of Figure 5.38(c), for l = 1, 2, . . . , L−1.
For l = 0, since the zeroth polyphase component of z −l H(z) is E0 (z), the
block z −k−1 EL−l (z) is replaced by z −k E0 (z).
Sec. 5.8 Application Examples 139
x [n] y[n]
↑L H (z ) z −l z −kL ↓L ↓P
(a)
x [n] y[n]
↑L z −l H (z ) ↓L z −k ↓P
(b)
x [n] y[n]
for l = 0: z −k E0 (z) ↓P
x [n] y[n]
for l = 0: z −k−1 EL−l (z) ↓P
(c)
Tb
cos 2 πfIF n
L1
⊗
sR [n]
Tb
↑ L1 pT n cos(2 π(fc − fIF )t)
L1
Tb
− sin 2 πfIF n
L1 ⊕
xIF [n]
DAC ⊗ fc
xRF (t)
⊗
sI [n]
Tb
↑ L1 pT n
L1
Analog upconversion to RF
Let the IF modulated signal xIF [n] have the spectrum shown in Fig-
ure 5.40(a). Here, the spectrum of xIF [n] is shown over the range −fs,IF /2
to +fs,IF /2, where fs,IF = 1/Ts,IF = L1 fb is the sampling frequency at
the output of the IF stage and fb = 1/Tb is the symbol rate. By pass-
ing xIF [n] through an L2 -fold expander, we will obtain a discrete time
signal whose spectrum over the range −fs,RF /2 and +fs,RF /2 (where
fs,RF = L2 fs,IF = Lfb , with L = L1 L2 , is the new sampling frequency) has
L2 repetitions of the spectrum shown in Figure 5.40(a). This, for L2 = 8, is
shown in Figure 5.40(b). Now, if L2 is chosen sufficiently large such that for
some integer 0 < k < L2 /2, kfs,IF ± fIF is equal to the carrier frequency fc ,
the desired modulated signal can be extracted from the expanded version
of xIF [n] by a filter that selects the relevant components of the spectrum.
Figure 5.40(c) shows the output of such a filter, when fc = 3fs,IF + fIF .
XIF (e j2 πf )
−
fs,IF −fIF fIF fs,IF
2 2
(a)
XIF ,e (e j2 πf )
Δ1 Δ2
(b)
XRF (e j2 πf )
Figure 5.41 shows the block diagram of an all digital QAM modulator
that operates based on the above principle. One may note that, with some
minor difference, this is similar to a multistage interpolator. In the first
stage, sR [n] and sI [n] are interpolated (pulse shaped, to be more accurate)
L1 -fold and modulated to an IF frequency, fIF . In the second stage, through
an L2 -fold expander, many replicas of the IF signal are made available for
further processing. With proper selection of the parameters L1 , fIF and L2
such that fc = kfs,IF ± fIF , for an integer 0 < k < L2 /2, one of the replicas
is the desired RF signal. This is filtered digitally before passing the final
output to a DAC.
Tb
cos 2 πfIF n
L1
⊗
sR [n]
Tb
↑ L1 pT n
L1
Tb
− sin 2 πfIF n
L1
⊕
xIF [n]
↑ L2
xIF,e [n]
fc
DAC
xRF (t)
⊗
sI [n] Tb digital upconversion to RF
↑ L1 pT n
L1
Figure 5.41: Block diagram of an all digital QAM modulator in the new
generation of data modems.
to Figure 5.40(b) and note that the transition band of the latter filter is
determined by the minimum of Δ1 and Δ2 .
We note that the above choice of fIF imposes a tight relationship be-
tween the carrier frequency, fc , and the symbol rate, fb . More particularly,
we find that since fIF = 14 fs,IF = 14 L1 fb , fc = kfs,IF ± fIF = (k ± 14 )L1 fb .
Obviously, the three expander/filtering pairs in Figure 5.41 can be im-
plemented efficiently using polyphase structures. In addition, in upconver-
sion to the RF band, one may need to perform some parallel processing to
be able to cope with the very high sampling rate of the signal at the DAC
input. This is discussed in Section 5.8.4.
Tb
cos 2 πfIF n
L1
⊗
Tb ŝR [n]
cos(2 π(fc − fIF )t) pR
L1
n ↓ L1
⊗
xRF (t) xIF [n]
Tb
ADC − sin 2 πfIF n
L1
fIF
⊗
ŝI [n]
Analog down-conversion to IF Tb
pR n ↓ L1
L1
kfs,IF ± fIF holds. We thus note that xIF [n] can be obtained directly by
decimating xRF [n].
The above discussion ignores a practical fact that xRF [n] may contain
the desired spectrum/signal (shown in Figure 5.40(c)) as well as undesired
(noise and/or interference) signals that lie in other portions of the spectrum.
If unfiltered, decimation may result in aliasing of the undesired signals over
the band of the desired signal. A pictorial presentation of this concept,
for fc = 2fs,IF + fIF , is presented in Figure 5.43. The IF signal xIF [n]
is obtained from xRF [n] through an L2 -fold decimator that reduces the
sampling rate from fs,RF = L2 fs,IF to fs,IF . This results in repetition of
the spectrum XRF (ej2πf ) with frequency spacing fs,IF . In Figure 5.43 the
spectra segments of XRF (ej2πf ) that correspond to positive and negative
frequencies are presented in full-line and dashed-line plots, respectively.
Here, we assume that the desired signal is confined within the flat part of the
plots. Accordingly, before decimation, xRF [n] has to be filtered with a filter
whose passband matches the flat part of XRF (ej2πf ) and its transition band
is equal or narrower than the slanted parts of XRF (ej2πf ) in Figure 5.43.
From the presentations in Figure 5.43, it is obvious that if xRF [n] had
a wider transition bandwidth than what is shown, the decimation would
result in aliasing of undesired signals over the band of the desired signal.
Moreover, we may note the choice of fIF = 14 fs,IF leads to homogenous
spread of the spectral images in XIF (ej2πf ).
Based on the above discussion, the block diagram shown in Figure 5.44
is proposed for an all digital QAM receiver.
Sec. 5.8 Application Examples 145
XRF (e j2 πf )
XIF (e j2 πf )
··· ···
−fs,IF −fIF fs,IF
1
fIF = fs,IF
4
Tb
cos 2 πfIF n
L1
⊗
ŝR [n]
Tb
pR n ↓ L1
L1
⊗
ŝI [n]
Tb
Digital down-conversion to IF pR n ↓ L1
L1
x [n] y0 [n − 1 ]
R0 (z ) z −1
y1 [n − 1 ]
R1 (z ) z −1
y[n]
RL−1 (z ) z −1
yL−1 [n − 1 ]
Figure 5.45: Modified structure of Figure 5.21. The delay units are added
to allow operation of the commutator while polyphase filters compute the
next set of samples of output.
5.9 Problems
1. Figure 5.3(b) presents a plot of Xd (ej2πf ) for a two-fold decimator.
Present a similar plot for the case where the decimation factor is
M = 3.
(a) Consider the block diagram shown in Figure 5.46. Here, the
first two blocks generate an L-fold interpolated version of x[n].
Let H(z) be a zero-phase Nyquist (L) filter designed such that
it cancels all the images of X(ej2πf ) which appear as a result
of the L-fold expander block. By choosing x[n] = prc (nTb /2)
with the roll-off factor α = 0.5, L = 3, and presenting plots of
X(ej2πf ) and Xe (ej2πf ), suggest a possible magnitude response
for H(ej2πf ). Also, recall the Nyquist criterion (4.92) and from
there find the passband gain of H(ej2πf ) such that y[n] = x[n].
(b) Develop a MATLAB program to confirm the above results. Note
148 Multirate Signal Processing Chap. 5
that for the Nyquist filter you can choose a raised-cosine filter
with proper parameters. Do so in the MATLAB program that
you develop.
3. Consider the sampled raised-cosine pulse prc,1 [n] = prc (nTb /2) with
the roll-off factor α = 0.5.
(a) Present a plot of Prc,1 (ej2πf ) in the interval −0.5 < f < 0.5.
(b) Let prc,1 [n] pass through an 8-fold expander. Call the output
of the expander prc,2 [n]. Present a plot of Prc,2 (ej2πf ) in the
interval −0.5 < f < 0.5.
(c) You should have found that Prc,2 (ej2πf ) has a multiband spec-
trum. Design a bandpass filter that picks the bands around the
frequencies ±0.375, let prc,2 [n] pass through this filter, and call
its output g[n]. Give a mathematical expression for g[n].
(d) Develop a MATLAB program to confirm the accuracy of your
answer to Part (c).
4. Recall from Section 5.3 that an L-fold expander and an M -fold deci-
mator are commutable only when L and M are prime with respect to
each others. In Section 5.3, the correctness of the rule was shown for
the case where L = 2 and M = 3. Through an example, show that
the same is true for the following cases:
(a) L = 3, M = 2.
(b) L = 3, M = 4.
5. Show that an L-fold expander and an M -fold decimator are not com-
mutable when
(a) L = 2, M = 4.
(b) L = 4, M = 2.
6. In Section 5.3, we showed that for an L-fold expander and an M -fold
decimator to be commutable, the sets {e−j2πk/M , k = 0, 1, · · · , M −1}
and {e−j2πkL/M , k = 0, 1, · · · , M − 1} must be the same. Compare
the two sets for the following cases and from there conclude that in
which cases the commutative rule is applicable and for which ones
not.
Problems 149
(a) L = 3, M = 2.
(b) L = 3, M = 4.
(c) L = 2, M = 4.
(a) H(z) = 1
1−0.7z −1 .
z −1
(b) H(z) = 1−0.7z −1 .
z −1
(c) H(z) = (1−0.3z −1 )(1−0.5z −1 ) .
Note: For case (c), you may start with using partial fractions to
separate H(z) to two first order terms.
11. The samples of a raised-cosine pulse prc (t) (equation (3.9)), with the
roll-off factor α = 0.5, for t = −5Tb to 5Tb at the spacing of Tb /3 are
available. Using these samples and a 2/3-fold resampling structure
similar to Figure 5.10 we wish to obtain samples of prc (t) at the
spacing of Tb /2. Design the required lowpass filter and confirm your
design through a MATLAB program. Use a lowpass filter of order
N = 50.
12. Repeat Problem 11 when the available samples are at the spacing
Tb /2 and we wish to obtain the samples at the spacing Tb /3.
13. Let the lowpass filter that you designed in Problem 11 be H(z) =
18 −k
k=0 h[k]z . Note that here, for simplicity, the order of H(z) is
reduced from 50 to 18. Also, let the polyphase structure of Figure 5.25
be used for efficient implementation of the resampler.
14. Recall the development and discussion that led to Figure 5.25. Also,
as discussed in Problem 13, above, the polyphase components E0 (z),
E1 (z), · · · could be further divided into smaller polyphase compo-
nents.
Now, consider an L/M resampler with L = 3 and M = 2. For this
case, starting with the structure shown in Figure 5.23 and following
similar steps to those in Figure 5.25, develop a polyphase structure
in which R0 (z), R1 (z), · · · are further divided into more polyphase
components. Discuss the advantages that this structure offers when
the resampler has to run at a very high speed.
15. It is desired to design a lowpass filter with band edges f1 = 0.04 and
f2 = 0.042 and the passband and stopband ripples δ1 = 0.001 and
δ2 = 0.0001.
(a) Using Kaiser’s formula, find the order of the desired filter, if a
direct design is to be used.
(b) Examine various choices of the interpolation factor M , from 2
to 12, and from them choose the one that leads to a design with
the minimum complexity.
(c) Find the filter coefficients (using firpm of MATLAB) and present
the plots of the magnitude responses of G(z), I(z) and H(z) =
G(z M )I(z) for the minimum complexity design that you ob-
tained in Part (b).
(a) For M = 3, give the design specification of the model filter G(z).
Also, find the order of the interpolation filter I(z) in this case.
(b) Starting with the design specification for G(z) obtained in Part
(a), explore the possibility of using an IFIR design for G(z) and
find the minimum complexity design for this case. Your com-
plexity calculation should include the I(z) of Part (a). Compare
your results here with those in Problem 15.
19. For the best design obtained in Problem 18, present the details of the
system structure based on polyphase components and commutators.
Assuming that the rate of signal samples at the input is fs , at each
stage of the presented structure indicate the rate of signal samples.
20. For a CIC interpolator with the following parameters examine the
number of delay units in the system and the total number of addi-
tion/subtraction operations per output sample:
(a) L = 50, K = 1, N = 4;
(b) L = 50, K = 2, N = 4;
(c) L = 50, K = 4, N = 4;
21. For a CIC decimator with the following parameters examine the
number of delay units in the system and the total number of ad-
dition/subtraction operations per output sample:
(a) M = 50, K = 1, N = 4;
(b) M = 50, K = 2, N = 4;
(c) M = 50, K = 4, N = 4;
22. Develop a MATLAB program that begins with the following lines:
L0=5;alpha=0.5;
x=r cos p(10*L0,L0,alpha);
These generate a band limited (raised-cosine) pulse. Take x as input
x[n] to the CIC structure of Figure 5.33 and complete the program to
generate the output y[n]. Examine y[n] and compare it with an exact
raised-cosine pulse, sampled at the same rate as y[n]. Also, recall that
CIC structure has large passband gain that should be compensated
for before making the comparisons. Moreover, for the purpose of
comparisons, you should time align y[n] and the exact pulse. Present
and comment on the results for the following parameters:
(a) K = 2, L = 3, N = 4.
(b) K = 2, L = 5, N = 4.
(c) K = 2, L = 10, N = 4.
(d) K = 1, L = 3, N = 4.
(e) K = 1, L = 5, N = 4.
152 Multirate Signal Processing Chap. 5
(f) K = 1, L = 10, N = 4.
(g) K = 2, L = 5, N = 2.
(h) K = 1, L = 5, N = 2.
In order to better understand and to provide more in depth com-
ments, you may also examine and compare the spectra of y[n] and
the exact pulse. Try to relate your observations with the expected dis-
tortion caused by the CIC structure (see Figure 5.32 and the relevant
discussions in the text).
23. Consider the QAM modulator shown in Figure 5.39. We wish to im-
plement the analog up-conversion block of this figure digitally, using
the structure shown in Figure 5.47. In this structure the L2 -fold ex-
pander and the attached filter increase the IF signal rate from fs,IF
to fs,RF = L2 fs,IF . The rule of filter G(z) is to remove a signal image
that appears in xRF [n] around fc − 2fIF . Let xIF [n] be a narrow band
signal at fIF = fs,IF /4 Hz, with a bandwidth B = fs,IF /10. Also, let
L2 = 100.
(a) Using the Kaiser’s formula, find the orders of H(z) and G(z).
For the designs assume the following ripple parameters δ1 = δ2 =
0.001.
(b) Evaluate the number of multiplications and additions that is
required for computation of each sample of the output xRF [n].
For this study, assume that the values of cos(2π(fc −fIF )nTs,RF )
are pre-stored in a table and thus they are obtained without any
numerical operation.
xIF [n] xIF,e [n] xIF,e [n] xRF [n] xRF [n]
↑ L2 H(z) ⊗ G(z)