Vous êtes sur la page 1sur 54

Chapter 5

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

5.1 M -fold Decimator and L-fold Expander


5.1.1 M -fold decimator
The M -fold decimator takes an input sequence x[n] and produces the out-
put sequence
xd [n] = x[M n] (5.1)
where M is an integer. In other words, the M -fold decimator only keeps
one out of every M elements of x[n] and ignores the rest. Figure 5.1 shows
the building block that is commonly used for presentation of the M -fold
decimator. A demonstration of decimation for M = 2 is presented in Fig-
ure 5.2

x [n] ↓M xd [n]

Figure 5.1: M -fold decimator.

x [n] −2 3
−3 −1 0 1 2 n

xd [n] −1
0 1 n

Figure 5.2: A demonstration of decimation for M = 2.

Transform domain analysis


The z-transform of the decimated sequence xd [n] is obtained as


Xd (z) = xd [n]z −n
n=−∞
∞
= x[M n]z −n . (5.2)
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

Substituting this result in (5.4), we get

1   1/M −j2πk/M 
M −1
Xd (z) = X z e . (5.9)
M
k=0

If z is replaced by ej2πf in (5.9), we obtain


M −1
j2πf 1 
Xd (e )= X(ej2π(f −k)/M ). (5.10)
M
k=0
102 Multirate Signal Processing Chap. 5

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)

Figure 5.3: Graphical presentation of the decimation effect in the frequency


domain in a two-fold decimator.

5.1.2 L-fold expander


The L-fold expander takes the input sequence x[n] and produces the output
sequence 
x[n/L], n = multiples of L
xe [n] = (5.11)
0, otherwise
where L is an integer. In other words, to generate the sequence xe [n], the
L-fold expander inserts L − 1 zeros after each element of x[n]. Figure 5.4
shows the building block that is commonly used for presentation of the
L-fold expander. A demonstration of expander for L = 2 is presented in
Figure 5.5.

x [n] ↑L xe [n]

Figure 5.4: L-fold expander.


Sec. 5.1 M -fold Decimator and L-fold Expander 103

x [n] −2
−1 0 1 2 n

xe [n] −4
−5 −3 −2 −1 0 1 2 3 4 5
n

Figure 5.5: A demonstration of expander for L = 2.

Transform domain analysis


The z-transform of the expanded sequence xe [n] is obtained as


Xe (z) = xe [n]z −n
n=−∞
∞
= x[n]z −Ln
n=−∞
∞
 −n
= x[n] z L
n=−∞
 
= X zL . (5.12)
Also, substituting z by ej2πf , we obtain
Xe (ej2πf ) = X(ej2πLf ). (5.13)
This shows that an L-fold expansion of a sequence in the time domain
results in an L-fold compression of the spectrum along the frequency axis.
This is demonstrated graphically in Figure 5.6. Note that the compression
along the frequency axis results in L-fold repetition of the spectrum over the
range 0 ≤ f ≤ 1. As we shall see later, selection of one of the repetitions and
deletion of the rest using a filter allow signal interpolation and modulation
in a very efficient way; see Section 5.8.2.
An alternative interpretation of the above results may prove instructive.
Consider the sampled signal


xs (t) = x[n]δ(t − nTs ) (5.14)
n=−∞

and its expanded version




xse (t) = xe [n]δ(t − nTs /L). (5.15)
n=−∞
104 Multirate Signal Processing Chap. 5

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)

Figure 5.6: Graphical presentation of the expansion effect in the frequency


domain for a two-fold expander.

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.

5.1.3 The nature of decimator and expander blocks


At this point, it is worth noting that although decimator and expander are
linear systems, they belong to the class of time-variant systems. Hence,
they cannot be classified as LTI systems and thus the rules of LTI systems
are not applicable to multirate systems that inevitably contain decimators
and/or expanders. In particular, the commutative rules that are frequently
used in manipulation of LTI systems are often inapplicable to multirate
systems.

5.2 Rate Conversion


Consider a continuous-time signal x(t) and its sampled sequence x[n] =
x(nTs ). Given x[n], we wish to obtain the sampled sequence x [n] = x(nTs )
Sec. 5.2 Rate Conversion 105

of the same continuous-time signal x(t). A naive approach would be to


reconstruct the continuous-time signal x(t) by passing the sampled signal



xs (t) = x[n]δ(t − nTs )
n=−∞

through a lowpass filter as discussed in Section 4.1.1, and resample the


reconstructed signal at the desired rate fs = 1/Ts . This solution is not
attractive because it involves the additional circuitry for digital-to-analog
conversion, filtering, and analog-to-digital conversion. In this section, we
discuss how multirate signal processing can be used to perform resampling
in the digital domain, i.e., without resorting to the use of digital-to-analog
and analog-to-digital converters.

5.2.1 L-fold interpolation


L-fold interpolation refers to the case where one wishes to reconstruct a
sampled signal x[n] at a rate L-times greater than the current rate. In
other words, L − 1 new samples have to be found and appended after each
sample. This can be easily done by passing x[n] through the cascade of an
L-fold expander and a lowpass filter, as shown in Figure 5.7.

x [n] xe [n] Lowpass x  [n]


↑L filter

Figure 5.7: L-fold interpolator.

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

5.2.2 M -fold decimation


In the context of this section M -fold decimation means reducing the sam-
pling rate of a signal sequence x[n] M times. When x[n] is bandlimited
and decimation does not result in aliasing, M -fold decimation can be es-
tablished by choosing one out of every M elements of x[n] and ignoring the
rest. In other words, the resampled signal sequence x [n] is given by

x [n] = x[M n]. (5.16)

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].

x [n] Lowpass x  [n]


filter
↓M

Figure 5.9: M -fold decimator. The lowpass filter is to avoid aliasing after
down-sampling.

5.2.3 L/M -fold rate change


With the background developed above, we are now ready to discuss the
T
general case of resampling, when Tss = M L . This can be readily done by
first interpolating x[n] L-fold, and then decimating the result M -fold, as
shown in Figure 5.10. Here, the lowpass filter has two roles: (i) to cancel
the repetitions of the spectral copies of X(ej2πf ) as in the L-fold interpo-
lator; (ii) to reject any portion of the spectrum X(ej2πf ) that may result
in aliasing after down-sampling. The latter may be required only when
M > L.

x [n] Lowpass x  [n]


↑L filter
↓M

Figure 5.10: L/M -fold resampling.


108 Multirate Signal Processing Chap. 5

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

L=3; M=2; fs in=6; Ts in=1/fs in;


t in=[0:Ts in:5];x in=sin(2*pi*t in)+2*cos(4*pi*t in);
x e=expander(x in,L);
t cont=[0:0.01:5]; x cont=sin(2*pi*t cont)+2*cos(4*pi*t cont);
h=L*firpm(60,[0 2/(fs in*L) 4/(fs in*L) 0.5]*2,[1 1 0 0],[1 1]);
x ef=filter(h,1,x e); x out=x ef(1:2:end);
Ts out=Ts in*M/L;t out=[0:length(x out)-1]*Ts out;
delay=(Ts in/L)*(length(h)-1)/2;
x delayed=sin(2*pi*(t cont-delay))+2*cos(4*pi*(t cont-delay));
figure;stem(t in,x in,’k’,’filled’); hold on;
plot(t cont,x cont,’–k’); xlabel(’t’),ylabel(’x in’)
figure; stem(t out,x out,’k’,’filled’); hold on
plot(t cont,x delayed,’–k’); axis([0 5 -3 3]); xlabel(’t’),ylabel(’x out’)

Most of this script is self-explanatory. The reader should also take note of
the following points:

• The vector ‘t cont’ defines a dense grid of sampling times that is


used to approximate the continuous time.

• 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.

• The filter ‘h’ introduces a delay equivalent of N/2 samples, where


N is the FIR filter order. In matching the interpolated samples to
x(t) this delay has been accounted for.
Sec. 5.3 Rate Conversion 109

1.5

1
Xe(ej2Sf)

0.5

0
0 0.1 0.2 0.3 0.4 0.5
f

Figure 5.11: Fourier transform of the input signal after expansion.

1
in

0
x

1

2

3
0 1 2 3 4 5
t

Figure 5.12: Input signal samples.


110 Multirate Signal Processing Chap. 5

1
out

0
x

1

2

3
0 1 2 3 4 5
t

Figure 5.13: Output signal samples.

5.3 Commutative Rules


In classical signal processing, where linear time-invariant (LTI) building
blocks are connected together to make a system, the commutative rules are
straightforward. Any set of blocks along each branch can be commuted
arbitrarily. In multirate signal processing, the presence of decimators and
expanders makes this rule not always applicable and thus multirate systems
should be treated more carefully.
An important case in multirate systems where commutative rules are
not always applicable is when decimators and expanders are cascaded as in
Figure 5.14. Considering the case where L = M , one easily finds that

x[n], n = multiple of M
y1 [n] =
0, otherwise

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

{x[0], 0, x[3], 0, x[6], · · ·}

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

be proved by noting that

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

and the sets {e−j2πk/M , k = 0, 1, · · · , M − 1} and {e−j2πkL/M , k =


0, 1, · · · , M − 1} are the same when and only when L and M are prime
with respect to each others.

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

x [n] p[n] y1 [n] x [n] q[n] y2 [n]


↓M z −1 ≡ z −M ↓M

(a)
x [n] p[n] y1 [n] x [n] q[n] y2 [n]
z −1 ↑L ≡ ↑L z −L

(b)

Figure 5.15: Modification of the unit delay as it cascades and commutates


with decimator and expander blocks.

The multirate identities presented in Figures 5.15(a) and (b) can be


generalized as in Figures 5.16(a) and (b), where G(z) can be any rational
(i.e., a ratio of polynomials of z or z −1 ) transfer function. These which are
known as the noble identities , prove very useful in efficient realization of
multirate signal processing systems. In particular, we find these very useful
in development of the polyphase structures that are presented in the next
section. The noble identities can be easily proved by expressing y1 [n] and
y2 [n] in the z-domain.
In Figure 5.16(a),

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

On the other hand,

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 1/M −j2πk/M


= X z e G z e
M
k=0

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

In Figure 5.16(b), Y1 (z) = P (z L ) = G(z L )X(z L ), Q(z) = X(z L ), and,


thus, Y2 (z) = G(z L )Q(z) = G(z L )X(z L ) = Y1 (z).

x [n] p[n] y1 [n] x [n] q[n] y2 [n]


↓M G(z ) ≡ G(z M ) ↓M

(a)
x [n] p[n] y1 [n] x [n] q[n] y2 [n]
G(z ) ↑L ≡ ↑L G(z L )

(b)

Figure 5.16: The noble identities.

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

Figure 5.17: Trivial commutative rules.


114 Multirate Signal Processing Chap. 5

5.4 The Polyphase Representations


The basic idea of polyphase representation can be best explained through
a simple example. Consider a filter with the transfer function H(z) =
1 + 2z −1 + 3z −2 + 4z −3 . By separating the terms with even and odd powers
of z, this can be rearranged as

H(z) = E0 (z 2 ) + z −1 E1 (z 2 )

where E0 (z) = 1 + 3z −1 and E1 (z) = 2 + 4z −1 . Here, E0 (z) and E1 (z) are


called the zeroth and first polyphase components of H(z).
∞Extending −n the above idea to a general transfer function H(z) =
n=−∞ h[n]z , for an integer M , we can always decompose H(z) as


H(z) = h[nM ]z −nM
n=−∞


+z −1 h[nM + 1]z −nM
n=−∞
..
.


−(M −1)
+z h[nM + M − 1]z −nM (5.19)
n=−∞

which can be written as


M
 −1
H(z) = z −k Ek (z M ) (5.20)
k=0

where


Ek (z) = h[nM + k]z −n . (5.21)
n=−∞

Equation (5.20) is called Type 1 polyphase representation of H(z) (with


respect to M ) and Ek (z) is the respective kth polyphase component. Note
(M )
that Ek (z) vary with M . So, a notation such as Ek (z) would have been
more logical. This is usually avoided for brevity.
A rearrangement of (5.20) leads to
M
 −1
H(z) = z −(M −1−k) Rk (z M ) (5.22)
k=0

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

It is important to note that the polyphase representations are applicable


to both FIR and IIR filters. Polyphase representations of FIR filters follow
the above equations. Using partial fraction method, an IIR filter, in general,
can be expanded to a summation of the terms of the form Hl (z) = 1/(1 −
αl z −1 ) (and possibly a FIR term). The polyphase components of each term
Hl (z) can then be obtained by recalling the identity

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

5.5 Efficient Structures for Decimation and


Interpolation Filters
The interpolation filter (the lowpass filter) in Figure 5.7 has an input in
which only one out of every L samples is non-zero. On the other hand,
in Figure 5.9 only one out of every M output samples of the decimation
filter need to be calculated. These special features of the interpolation
and decimation filters can be best captured in computationally efficient
structures by using the polyphase representations that were discussed in
the previous section.

5.5.1 Polyphase structure for decimator filters


Consider the M-fold decimator shown in Figure 5.18(a). Substituting H(z)
by its Type 1 polyphase representation (5.20), we obtain the alternative
realization shown in Figure 5.18(b). By shifting the M -fold decimator to the
M parallel branches in Figure 5.18(b) and invoking the first noble identity
(i.e., the one in Figure 5.16(a)), we obtain the desired polyphase structure
shown in Figure 5.18(c).
Compared to the direct structure of Figure 5.18(a), the polyphase struc-
ture of Figure 5.18(c) offers a number of advantages. These advantages be-
come very eminent when the decimator is to be implemented in hardware
(either on an FPGA or a VLSI ASIC chip). To highlight these advantages, a
detailed implementation of Figure 5.18(a) is presented in Figure 5.19. Here,
a total of N multiplications and N − 1 additions have to be performed for
116 Multirate Signal Processing Chap. 5

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)

Figure 5.18: Polyphase implementation of an M -fold Decimator. (a) Direct


implementation. (b) Intermediate structure. (c) The desired polyphase
structure.
Sec. 5.5 Efficient Structures for Decimation and Interpolation 117

computation of each output sample of H(z). Moreover, even though only


one out of every M output samples of the filter is needed (because of the
M -fold decimator), the N multiplications and N − 1 additions have to be
performed before arrival of the next sample of the input, as the content
of the delay line (the shift register) holding x[n] and its delayed samples
changes. In other words, although the output y[n] is needed at a rate M
times slower than the rate of x[n], the filter H(z) has to catch-up with the
rate of input for computation of each sample of y[n], while it remains idle
for the next M − 1 sample intervals of input before starting computation
of the next sample. This clearly is a waste of resources. The polyphase
components in Figure 5.18(c), on the other hand, operate at the output
rate (i.e., the lowest rate in the system) and, thus, remain operational all
the time (no rest periods). In addition, the polyphase structure lends it-
self to parallel processing in a more natural manner. For example, each
polyphase component filter may be handled separately through a separate
multiply/accumulate processor.

x [n]
z −1 z −1 z −1

h[0 ] h[1 ] h[N − 1 ]


⊗ ⊗ ⊗

⊕ y[n]
↓M

Figure 5.19: A direct implementation of Figure 5.18(a).

We may note that the above advantages of the polyphase structure of


Figure 5.18(c) do not hold if it is to be implemented in a software based
system, such as a digital signal processor. In fact, if only the output samples
that are required after decimation are to be calculated (which is the case
in practice), one finds that the number of additions and multiplications
per unit of time in polyphase and direct implementation are exactly the
same. On the other hand, the polyphase implementation may bring some
structural software complexity that makes it less attractive than the direct
implementation.
118 Multirate Signal Processing Chap. 5

5.5.2 Polyphase structure for interpolator filters


Consider the L-fold interpolator shown in Figure 5.20(a). Using the Type 2
polyphase representation (5.22), we obtain the alternative realization shown
in Figure 5.20(b). By invoking the second noble identity (i.e., the one
in Figure 5.16(b)), we obtain the desired polyphase structure shown in
Figure 5.20(c). Comparing the polyphase and direct implementation, here,
we note that while in the direct form H(z) has to run at the output rate
(the higher rate in the system), the polyphase filters operate at the input
rate. Moreover, because of the expander, L−1 out of every L input samples
to H(z) are zero. Hence, either many unnecessary/trivial multiplications
by zero have to be performed or special control circuitry should be used
to only operate on the non-zero samples for computation of each output
sample.


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)

Figure 5.20: Polyphase implementation of an L-fold Interpolator. (a) Direct


implementation. (b) Intermediate structure. (c) The desired polyphase
structure.

Unlike the case of the decimator, the polyphase interpolator structure


may also prove useful if it is to be implemented on a software based system.
The polyphase structure dictates how the filter coefficients and samples of
input are to be stored and accessed from the memory for generation of the
Sec. 5.5 Efficient Structures for Decimation and Interpolation 119

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.

5.5.3 Commutator models


In the polyphase structure of Figure 5.20(c), the expander and delay blocks
may be replaced by a commutator block that takes successive samples of
y[n] from the outputs of the polyphase filters R0 (z), R1 (z), · · ·, RL−1 (z).
This is because careful examination of Figure 5.20(c) reveals that the output
sequence y[n] takes the form
· · · , y1 [n − 1], y0 [n − 1], yL−1 [n], · · · , y1 [n], y0 [n], yL−1 [n + 1], · · ·
where y0 [n], y1 [n], · · ·, yL−1 [n] are the output sequences from the polyphase
filters R0 (z), R1 (z), · · ·, RL−1 (z), respectively. Figure 5.21 presents a block
schematic of the L-fold interpolator with the delay/add blocks replaced by
a commutator. The commutator runs over the outputs of the polyphase
filters clockwise, starting with the output of RL−1 (z), and begins the cycle
once it has picked the output of R0 (z).

x [n] y0 [n]
R0 (z )

y1 [n]
R1 (z )

y[n]

yL−1 [n]
RL−1 (z )

Figure 5.21: Polyphase structure of an L-fold interpolator with output


samples generated through a commutator.

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 ]

Figure 5.22: Polyphase structure of an M -fold decimator with input sam-


ples distributed through a commutator.

5.5.4 L/M -fold resampling


Here, we discuss how the L/M -fold resampler of Figure 5.10 can be realized
efficiently. The cases of L/M > 1 and L/M < 1 are treated separately.

The case of L/M > 1


Combining the L-fold expander and the lowpass filter of Figure 5.10 in
a polyphase structure, as in Figure 5.21, we obtain the structure of Fig-
ure 5.23(a). To accommodate for the M -fold decimator, one can simply
rotate the commutator arm at the steps of M polyphase outputs. This is
shown in Figure 5.23(b). For example, if L = 3 and M = 2, the output
samples are picked from y2 [n], y0 [n], y1 [n], y2 [n], y0 [n], y1 [n], · · ·.
The polyphase realization of Figure 5.23 is efficient and optimized for
implementation in software on a digital signal processor. The tapped delay
lines of the polyphase filters R0 (z), R1 (z), · · ·, RL−1 (z) are filled in with the
samples of input at the rate that they arrive. There is no redundant (zero)
samples stored. In addition, the commutator arrangement, as discussed
above, assures that only the essential samples of output are calculated.
When a hardware implementation with maximum speed of operation is
required, the polyphase realization of Figure 5.23 can be further improved
using the trick that is discussed below for the case of L/M < 1 (see Prob-
lem 14).
Sec. 5.5 Efficient Structures for Decimation and Interpolation 121

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]

The commutator arm rotates


at steps of M polyphase
output samples.
yL−1 [n]
RL−1 (z )

(b)

Figure 5.23: Polyphase structure of an L/M -fold resampler. (a) Interme-


diate polyphase structure. (b) The desired polyphase structure.
122 Multirate Signal Processing Chap. 5

The case of L/M < 1

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.24: An alternative polyphase structure of L/M -fold resampler.

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)

Figure 5.25: A more efficient polyphase structure of L/M -fold resampler.


(a) Intermediate structure. (b) The desired structure.

5.5.5 The polyphase identity


Figure 5.26(a) is a rather strange structure that appears in some multirate
systems and thus its study will prove useful. This is similar to the L/M -
resampling structure of Figure 5.10 with L = M . Recalling the polyphase
structure of Figure 5.24, for L = M , one finds that only the samples that
enter E0 (z) are non-zero. The inputs to the rest of polyphase components
are zero for all n. This is because the expander put M − 1 zeros after every
element of x[n] to make a group of M elements. The commutator passes
the first element of the group (which is x[n]) to E0 (z) and the rest of the
elements of the group (which are zeros) to E1 (z) through EM −1 (z). With
this observation, one obtains Figure 5.26(b) as an equivalent structure of
Figure 5.26(a). This result is known as the polyphase identity.
124 Multirate Signal Processing Chap. 5

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.

5.6 Multistage Implementation


We may recall from the discussion of the previous sections that in all cases of
sampling rate conversion (Figures 5.7, 5.9 and 5.10), we need to implement
a lowpass filter. Moreover, we noted that for large values of L and/or
M the length of the desired lowpass filter may become excessively large.
The polyphase structures were introduced as a method of implementing
these filters efficiently. In this section, we introduce another method that
can be used in conjunction with polyphase structures to further reduce the
complexity of implementation of interpolation and decimation filters.

5.6.1 Interpolated FIR (IFIR) technique


Consider the problem of designing a narrowband lowpass filter H(z) with
the desired magnitude response as in Figure 5.27(a). Recalling the Kaiser’s
and Bellanger’s formulae of Chapter 4, (equations (4.88) and (4.89)), be-
cause of the very narrow transition band, realization of this filter may re-
quire a very high order. Very high order naturally leads to a large number
of multiplications and additions for computation of each output sample of
the filter. The following trick may be used to reduce the computational
load. We begin with designing a filter G(z) whose magnitude response
is a stretched version of the desired response, e.g., as in Figure 5.27(b).
Note that in this example G(z) has band edges that are quadruple of those
of H(z). Next, by replacing each delay in G(z) by four delays, we ob-
tain filter with the transfer function G(z 4 ). Comparing G(ej2πf ) and
 aj2πf
G (e )4 = G(ej8πf ), one will find that the magnitude response of G(z 4 )
is obtained by compressing |G(ej2πf )| across the frequency axis four times.
This leads to the response shown in Figure 5.27(c). Cascading G(z 4 ) and a
filter I(z) with the magnitude response shown in Figure 5.27(c) results in
a filter with the same magnitude response as the desired response. This is
shown in Figure 5.27(d).
The key point that makes the cascade design G(z 4 )I(z) more efficient
than the direct design H(z) lies in the fact that G(z) has a transition band
Sec. 5.6 Multistage Implementation 125

|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

between the complexity (the number of non-zero coefficients) of G(z M ) and


I(z). Probably the easiest method of answering this question is to examine
various choices of the interpolation factor and choose the one that results
in the minimum complexity.
Example 5.2:
It is desired to design a lowpass filter with band edges f1 = 0.02 and f2 =
0.025 and the passband and stopband ripples δ1 = 0.01 and δ2 = 0.001.
• Using the Kaiser’s formula, find the order of the desired filter, if a
direct design was used.
• Examine various choices of the interpolation factor M and from
them choose the one that leads to a design with the minimum com-
plexity.
Solution:
For the direct design, substituting the specified parameters in the Kaiser’s
formula, we obtain NH = 507. Hence, we will have a total number of
coefficients NH + 1 = 508.
For the interpolation filter, if we choose M = 2, for G(z), we will get
the parameters f1 = 0.02M = 0.04, f2 = 0.025M = 0.05, δ1 = 0.01/2 =
0.005 and δ2 = 0.001 and accordingly the order NG = 274. Also, for
I(z), we will get the parameters f1 = 0.02, f2 = 0.5 − 0.025 = 0.475,
δ1 = 0.01/2 = 0.005 and δ2 = 0.001 and accordingly the order NI = 6.
Hence, we will have a total number of coefficients (NG +1)+(NI +1) = 282.
If we choose M = 3, for G(z), we will get the parameters f1 = 0.06,
f2 = 0.075, δ1 = 0.01/2 = 0.005 and δ2 = 0.001 and accordingly the
order NG = 183. Also, for I(z), we will get the parameters f1 = 0.02,
f2 = 13 − 0.025 = 0.3083, δ1 = 0.01/2 = 0.005 and δ2 = 0.001 and
accordingly the order NI = 9. Hence, we will have a total number of
coefficients (NG + 1) + (NI + 1) = 194.
In a similar way, we obtain
• for M = 4: NG = 137, NI = 13, hence, (NG + 1) + (NI + 1) = 152;
• for M = 5: NG = 110, NI = 18, hence, (NG + 1) + (NI + 1) = 130;
• for M = 6: NG = 91, NI = 23, hence, (NG + 1) + (NI + 1) = 116;
• for M = 7: NG = 78, NI = 28, hence, (NG + 1) + (NI + 1) = 108;
• for M = 8: NG = 69, NI = 34, hence, (NG + 1) + (NI + 1) = 105;
• for M = 9: NG = 61, NI = 41, hence, (NG + 1) + (NI + 1) = 104;
• for M = 10: NG = 55, NI = 50, hence, (NG + 1) + (NI + 1) = 107;
• for M = 11: NG = 50, NI = 60, hence, (NG + 1) + (NI + 1) = 112.
We observe that, as one would expect, as M increases, NG decreases
and NI increases. There should thus be a choice of M that strikes a
balance and results in the minimum value of (NG + 1) + (NI + 1). In the
present case, this balance happens when M = 9. Compared to the direct
design, this design reduces the number of non-zero coefficients from 508
to 104; an almost 5 fold reduction.
128 Multirate Signal Processing Chap. 5

Figures 5.28(a)-(d) show the magnitude responses of G(z), I(z), G(z 9 )


and G(z 9 )I(z), respectively. Note that how the images in the response
G(z 9 ) appear and how they are suppressed by the interpolator filter I(z).

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)

Figure 5.28: Magnitude response of the various filter designed in Example


5.2.

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.

5.6.2 Multistage realization of decimation and inter-


polation filters
Consider the L-fold interpolator shown in Figure 5.29(a). Assume that
L could be factored as L = L1 L2 and, thus, the expander ↑ L can be
replaced by the cascade of the expanders ↑ L1 and ↑ L2 . Moreover, let us
apply IFIR design to replace H(z) by the cascade of the transfer functions
G(z L2 ) and I(z). These give Figure 5.29(b) as an alternative realization
to Figure 5.29(a). Applying the second noble identity of Figure 5.16 to
swap the blocks G(z L2 ) and ↑ L2 , we obtain the desired structure as in
Sec. 5.6 Multistage Implementation 129

Figure 5.29(c). Here, interpolation is done in two stages: (i) ↑ L1 followed


by G(z); and (ii) ↑ L2 followed by I(z). Clearly, each of these stages may be
replaced by their respective polyphase structures for further improvement
on the implementation, as required.

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)

Figure 5.29: Development of a multistage interpolation filter. (a) Direct


realization. (b) Intermediate structure. (c) The desired structure.

To appreciate the computational advantage of the multistage imple-


mentation, we compare the number of operations (multiplications and ad-
ditions) that is required for computation of each sample of output in Fig-
ures 5.29(a) and (c). Assuming that H(z) is a FIR filter of order NH and
a polyphase structure is used for its implementation, computation of each
sample of output requires NH /L additions and (NH +1)/L multiplications1 .
In Figures 5.29(c), on the other hand, computation of each output sample
requires NI /L2 + NG /L additions and (NI + 1)/L2 + (NG + 1)/L multipli-
cations. The following example gives a better idea on how much we save
on the number of operations.
Example 5.3:
Consider the design and implementation of a 100-fold interpolator. Also,
assume that based on the spectral content of the input and the expected
accuracy of the interpolator, the design parameters for H(z) are chosen as
f1 = 0.002, f2 = 0.004, δ1 = 0.01 and δ2 = 0.001.
• Using Kaiser’s formula, find the order of H(z).
1 Note that when H(z) is a linear phase filter, the symmetry of the filter coefficients

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

• For L1 = 2 and L2 = 50, find the orders of G(z) and I(z).

• Compute the number of additions and multiplications for the direct


and multistage implementations and compare the results.

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.

The concept of multistage implementation may be extended similarly


to the decimation filters. This is demonstrated in Figure 5.30.

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)

Figure 5.30: Development of a multistage decimation filter. (a) Direct


realization. (b) Intermediate structure. (c) The desired structure.
Sec. 5.7 Cascaded Integrator-Comb Filters 131

5.7 Cascaded Integrator-Comb Filters


Cascaded integrator-comb (CIC) filters are an important class of filters that
was first proposed by Hogenauer in 1981 and subsequently have become
popular because of their very low complexity. These filters allow realization
of interpolators and/or decimators with only add/subtract operations. In
the next two subsections, we discuss an L-fold CIC interpolator and an M -
fold CIC decimator, separately. The combination of the two which results
in an L/M -fold resampler will then be straightforward. This is left as an
exercise at the end of the chapter.

5.7.1 L-fold CIC interpolator


Recall from Section 5.2.1 that an interpolator consists of an L-fold expander
followed by a lowpass filter. As shown in Figure 5.8, the output of the
expander is a signal whose spectrum within each interval of Lfs , where fs
is the sampling rate before the expander, consists of the spectrum of the
input signal plus L − 1 images of it. The task of the lowpass filter is to
remove these undesired images. The lowpass filter thus should have a flat
response over the bandwidth of the desired signal (the baseband signal)
and sufficient attenuation over the width of the undesired images.
In the CIC method, the interpolator lowpass filter is implemented as a
cascade of multistages of comb filters and integrators. Figure 5.31 shows
a CIC interpolator with N stages of comb filters and the same number of
integrators. Each comb filter generates KL zeros (where K is an integer)
at frequencies f = 0, 1/KL, 2/KL, · · ·, (KL − 1)/KL and each integrator
generates a pole at z = 0. The zero of the comb filter at f = 0 is thus
canceled by the pole of the integrator and, hence, the cascade of each pair
of comb filter and integrator results in the transfer function
1 − z −KL
G(z) =
1 − z −1
= 1 + z −1 + · · · + z −(KL−1) . (5.26)
Clearly, G(z) is a FIR filter with zeros at f = 1/KL, 2/KL, · · ·, (KL −
1)/KL. Note that the number of zeros in each comb filter is an integer
multiple of the interpolator factor L. This is a very important aspect of
the CIC interpolator which is discussed in detail later.
Substituting z by ej2πf in the first line of (5.26) and simplifying the
result, we obtain
sin(πKLf ) −jπ(KL−1)f
G(ej2πf ) = e . (5.27)
sin(πf )
Since there are N pairs of comb filters and integrators, the realized lowpass
filter has the transfer function
N
H(z) = (G(z)) . (5.28)
132 Multirate Signal Processing Chap. 5

−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)

Substituting z by ej2πf in (5.28) and using (5.27), we obtain



N
j2πf sin(πKLf )
H(e )= e−jπ(KL−1)N f . (5.29)
sin(πf )
Figure 5.32 presents the plots of magnitude response of H(z), for K = 2,
L = 5 and three values of N = 1, 2 and 4. The plots are normalized so
that their magnitude response at f = 0 be equal to 0 dB.

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

Figure 5.32: Magnitude response of the CIC lowpass filter for KL = 10


and three values of N = 1, 2 and 4.

In the applications of CIC interpolators, the input signal is usually


sampled at a rate large enough such that its normalized bandwidth (with
respect to the sampling frequency) is relatively small. The expander divides
this bandwidth by L when normalized to the new rate. In Figure 5.32, a
typical set of band edges of the input spectrum to the interpolator H(z)
are shown. As seen, H(z) has relatively flat response over the band of the
desired baseband spectrum and introduces deep nulls over the portions of
Sec. 5.7 Cascaded Integrator-Comb Filters 133

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)

An import practical point that should be noted here is the numerical


stability of the CIC structure. At first glance, one may believe that because
of the unity feedback gain in integrators, the output of such integrator will
sooner or later overflow and as a result the CIC interpolator will fail. In
the original paper of Hogenauer it is noted that as long as the CIC filter
is implemented in fixed point with two’s complement arithmetic, the unity
feedback of the integrators does not cause any numerical problem. This is
because when a sequence of add/subtract operations are implemented in
fixed point and two’s complement is used for number representations, as
long as the final result can be accommodated within the specified word
length, intermediate overflow of the numbers is of no consequence. Thus,
if two’s complement number representations are used, the only design con-
sideration that requires attention is the range of the system output. In
particular, we note that the passband gain of the interpolator filter is given
by H(ej0 ) = (KL)N and the expander gain at f = 0 is 1/L. Hence, the
passband gain of the CIC interpolator is K N LN −1 . Accordingly, the re-
134 Multirate Signal Processing Chap. 5

quired word-length of the CIC output y[n] is equal to the word-length of


x[n] plus log2 K N LN −1 bits. One may also choose to increase the word-
length gradually at successive stages of the interpolator. The original paper
of Hogenauer presents an excellent discussion on numerical stability of the
CIC interpolators/decimators.
Example 5.4:
Consider a CIC interpolator with an interpolation factor L = 100 and the
parameters K = 2 and N = 4. Calculate the number of delay units in
the system and the total number of addition/subtraction operations per
output sample.
Solution:
Since each comb filter requires K = 2 delay units and each integrator
requires 1 delay unit, the total number of delay units are 3N = 12. Also,
there are 4 subtractors running at the input rate and 4 adders running at
the output rate. Translating these to the output rate, the total number of
add/subtract operations per output sample is 4.04.

5.7.2 M -fold CIC decimator


An M -fold CIC decimator structure can also be derived by following similar
steps to those that led to the interpolator structure of Figure 5.33. Such
a structure is shown in Figure 5.34. The main difference between the two
structures (Figures 5.33 and 5.34) is that the order of the comb filters and
integrators are opposite. More detailed studies of the M -fold CIC decimator
are left as exercises at the end of the chapter.

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.

5.8 Application Examples


To demonstrate some of the benefits of multirate signal processing, in this
section, we present a few important applications of polyphase structures in
all digital data receivers.
Sec. 5.8 Application Examples 135

5.8.1 Timing recovery


In a data receiver, the incoming signal has to be sampled and synchronized
with data symbols. Figure 5.35 presents an example of a data signal carry-
ing binary data with symbol values of +1 and −1. Here, the data sequence
is {+1, −1, +1, +1, −1, +1, −1, −1, +1}. Channel distortion and noise are
assumed to be absent, for clarity. To extract the binary data, with good
immunity to channel noise, the received signal has to be sampled at the
correct timing phase. In Figure 5.35 two sets of samples are shown: one
with the correct timing phase, and another with an incorrect timing phase.
As seen, with the incorrect timing phase, some of the samples are taken
from the points where the received signal traverses between positive and
negative values, and, as a result, the recovered data bits may be wrong.
On the other hand, when samples are taken at correct sampling phase, the
sample values always have correct polarity and reasonably good magnitude.
Hence, correct decisions with low probability of error will be made, even in
the presence of significant channel noise.

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

Figure 5.35: A demonstration of correct and incorrect timing phases of data


signal carrying binary symbols.

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

This method which is demonstrated in Figure 5.36(b), may be thought of


as a hybrid solution, since timing control is generated digitally and then is
used to adjust the sampling clock through analog circuits. In a software
defined radio, where the use of analog components is minimized, timing (as
well as carrier) recovery is done completely in digital domain without any
interaction with the analog parts of the receiver. This is demonstrated in
Figure 5.36(c). The incoming signal, after some analog front-end process-
ing, such as amplification and filtering, is sampled at a nominal rate using
a free running sampling clock. The desired samples of the signal that are
synchronized to the symbol rate are constructed from these samples using
digital signal processing techniques. This, effectively, is equivalent to re-
sampling the signal at the correct timing phase. Resampling of a sampled
signal may be best done by deployment of interpolation techniques. The
sampled signal is expanded and interpolated to a rate high enough to give
us sufficient accuracy along the time axis so that the desired samples can
be chosen from the interpolated samples.
Let us consider the case where an analog data signal is sampled using a
free running sampling clock at a rate P times faster than the symbol rate.
However, because of the use of an uncontrolled timing clock none of the
samples are necessarily at the correct phase. Moreover, because of the free
running nature of the sampling clock, a (small) frequency mismatch between
the rate of the incoming symbols and the sampling clock is inevitable. Such
a mismatch results in a drift of the sampling phase, even if it is started at
a correct phase. Therefore, a mechanism that explores the present phase of
the clock and feeds the obtained information back for the correction of the
sampling phase should be devised. We will present a few algorithms that
establish such mechanism in Chapter 10. For the rest of the discussion in
this section, we simply assume a ‘genie’ tells us of any correction that may
have to be made to the timing phase.
Figure 5.37 presents the schematic diagram of an interpolator along
with the necessary blocks that enable the extraction of the desired signal
samples at the correct timing phase. The first two blocks, i.e., the L-
fold expander and the lowpass filter H(z), interpolate the signal samples
to a rate L times faster than the input rate. Since x[n] is at a rate P
times faster than the symbol rate, the output of H(z) is the signal samples
spaced at the interval of Tb /LP , where Tb is the symbol/baud interval.
This circuit thus delivers samples with a time precision of LP samples
per symbol interval. When we are only interested in the signal samples
at the symbol rate and at the correct timing phase, the third and forth
blocks in Figure 5.37 will complete the job. The block z −Δ delays the
interpolated signal samples such that the decimated output is the sequence
of the samples with the correct timing phase. To better understand how
this works, assume that the desired samples with the correct timing phase
are x1 [LP n − Δ], for n = 0, 1, 2, · · ·, where, as shown in Figure 5.37, x1 [n]
is the signal sequence at the output of H(z). Since x2 [n] = x1 [n − Δ] and
Sec. 5.8 Application Examples 137

Signal in Analog Digital Data out


Signal Signal
Processor Processor

Sampling
Timing control Clock

(a)

Signal in Analog Digital Data out


Signal Signal
Processor Processor

Sampling
Clock Timing control

(b)

Signal in Analog Digital Data out


Signal Signal
Processor Processor

Sampling
Timing control
Clock

(c)

Figure 5.36: Schematic diagrams of various timing recovery techniques. (a)


All analog. (b) Hybrid. (c) All digital.
138 Multirate Signal Processing Chap. 5

y[n] is LP -fold decimated version of x2 [n], y[n] = x2 [LP n] = x1 [LP n − Δ],


as desired. We also note that to cover all possible sampling phases, Δ may
take any value in the range of 0 to LP − 1.

x [n] xe [n] x1 [n] x2 [n] y[n]


↑L H (z ) z −Δ ↓ LP

Figure 5.37: An interpolator-decimator system for timing phase adjustment


in an all-digital modem.

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)

Figure 5.38: Simplification of the interpolator-decimator structure. (a) and


(b) Intermediate structures. (c) The desired structure.
140 Multirate Signal Processing Chap. 5

5.8.2 All digital modulator


Consider the implementation of a QAM modulator, where the transmit
signal has the form

xRF (t) = sR [n]pT (t − nTb ) cos(2πfc t) − sI [n]pT (t − nTb ) sin(2πfc t),
n
(5.33)
s[n] = sR [n] + jsI [n] is the transmitted data symbols, pT (t) is the transmit
pulse shape, Tb is the symbol/baud interval, and fc is the carrier frequency.
In the older generation of data modems, a realization that follows the
structure of Figure 5.39 was common. Here, pulse shaping and modulation
to an intermediate frequency (IF) is done digitally. In order to satisfy the
Nyquist criterion, the pulse shaping and modulation to the IF is done at
a rate L1 faster than the symbol rate. The IF signal is then up-converted
to the desired carrier through an analog modulator. The structures such
as Figure 5.39, where modulation/demodulation is done in two stages (i.e.,
from baseband to IF and then from IF to RF and vice versa) are known as
superheterodyne.

 
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

Qadrature amplitude modulation and


digital upconversion to IF

Figure 5.39: Block diagram of a QAM modulator in the older generation


of data modems.

In modern modems, where analog circuits are minimized, conversion


from an IF band to an RF band may be also done digitally (wherever pos-
sible).2 A direct method of mimicking the analog part of Figure 5.39 leads
to a rather expensive implementation. It is left to the reader to explore the
complexity of such an implementation (see Problem 23). Here, we present
a more elegant solution that takes advantage of multirate techniques.
2 When fc is very large, implementation of an all digital transmitter/receiver may not
be cost effective or feasible.
Sec. 5.8 Application Examples 141

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

fs,RF −fs,IF fs,IF fs,RF



2 fc = 3fs,IF + fIF 2

(b)

XRF (e j2 πf )

fs,RF −fc fc fs,RF



2 (c) 2

Figure 5.40: Signal spectra at different stages of the modulator.


142 Multirate Signal Processing Chap. 5

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

Qadrature amplitude modulation and


digital upconversion to IF

Figure 5.41: Block diagram of an all digital QAM modulator in the new
generation of data modems.

A particular choice of fIF can greatly simplify the implementation of


the all digital modulator of Figure 5.41. This particular choice of fIF can
be identified
 by
 noting that
 for an arbitrary
 fIF , the modulator factors
cos 2πfIF LTb1 n and − sin 2πfIF LTb1 n need to be calculated for each n.
However, if fIF is chosen equal to 41 fs,IF , one will find that, since fs,IF =
L1 fb ,
Tb π fs,IF π π
2πfIF n = Tb n = fb Tb n = n ,
L1 2 L1 2 2
   
and, thus, cos 2πfIF LTb1 n and − sin 2πfIF LTb1 n take the trivial values of
+1, 0, −1, 0, +1, 0, · · · and 0, −1, 0, +1, 0, −1, · · · respectively. This means
the computational burden of the modulator parts in Figure 5.41 can be
made minimal. Another advantage of this choice of fIF is that it maximizes
the separation of the replicas of the baseband spectrum in XIF,e (ej2πf ), and
this has direct impact on minimizing the order of the bandpass filter in the
digital upconversion to RF. To better understand this point, one may refer
Sec. 5.8 Application Examples 143

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.

5.8.3 All digital demodulator


In this section, we develop an all digital superheterodyne structure for ex-
tracting the information symbols s[n] = sR [n] + jsI [n] from a QAM modu-
lated received signal xRF (t). To this end, we begin with the receiver struc-
ture shown in Figure 5.42. Here, the down-conversion from RF to IF is
done in the analog domain and from IF to baseband is performed digitally.
Similar to the transmitter structure of Figure 5.39, this structure belongs
to a class of older generation of data modems. The rate of the samples
taken by ADC is assumed to be L1 times faster  than the symbol rate. Af-
ter multiplication of xIF [n] by cos 2πfIF LTb1 n and − sin 2πfIF LTb1 n , the
resulting signals contain the desired baseband signal as well as its undesir-
able spectral components around 2fIF . These undesirable components and
any additional signals that may arise from out of band noise or interference
from other communication channels are filtered by the lowpass filters pR (t)
which are chosen to be matched to the pulse shaping filters at the transmit-
ter. As discussed in Chapter 4, pT (t) and pR (t) filters are designed so that
their combination is a Nyquist filter. Assuming that the timing phase as
well as carrier phase and frequency at the receiver are chosen correctly, the
outputs of the matched filters, after decimation, are the desired symbols
sR [n] and sI [n] (contaminated with some noise and/or interference).
Next, we concentrate on the down-conversion from RF to IF and discuss
how this can be done digitally. Direct mimicking of the analog down-
conversion in the digital domain leads to a rather expensive implementation.
We thus resort to a direct DSP solution. For this, we first explore the
impact of decimation on the spectrum of a bandpass signal. This can be
best understood by studying Figures 5.40(c), (b) and (a), in this reverse
order. Figure 5.40(c) may be thought of as the power spectrum of xRF (t)
or, equivalently, the spectrum of its sampled version, xRF [n], in the interval
−fs,RF /2 to +fs,RF /2. If one out of every L1 samples of xRF [n] is preserved
and the rest of them are set equal to zero, the result will be a signal with
the spectrum shown in Figure 5.40(b). The decimated version of the latter
signal, i.e., the one obtained by removing the zero samples, is clearly the
IF version of the desired signal, xIF [n], assuming that the relationship fc =
144 Multirate Signal Processing Chap. 5

 
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

Digital down-conversion to baseband

Figure 5.42: Block diagram of a QAM demodulator in an older generation


of data modems.

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 )

−fc fc = 2fs,IF + fIF

XIF (e j2 πf )

··· ···
−fs,IF −fIF fs,IF
1
fIF = fs,IF
4

Figure 5.43: A presentation of spectra of an XRF [n] and its decimated


version. The flat part of the plots correspond to the desired signal band.

 
Tb
cos 2 πfIF n
L1


  ŝR [n]
Tb
pR n ↓ L1
L1

xRF (t) xIF [n]  


Tb
ADC ↓ L2 − sin 2 πfIF n
L1
fRF


  ŝI [n]
Tb
Digital down-conversion to IF pR n ↓ L1
L1

Digital down-conversion to baseband

Figure 5.44: Block diagram of an all digital QAM receiver.


146 Multirate Signal Processing Chap. 5

5.8.4 Parallel polyphase filtering for very fast sampling


rates
ADCs and DACs that can operate in the GHz range are available. More-
over, interfacing of the processing units (such as an FPGA chip) to such
ADC’s and DAC’s is possible. However, multipliers and adders in the
processing units may not be able to cope with such frequencies. In this
section, we show how one can benefit from the parallel processing offered
by the polyphase structures, to deal with this scenario. Our emphasis is
on the digital upconversion block in the transmitter of Figure 5.41 and the
digital down-conversion block in the receiver of Figure 5.44.

Transmitter parallel polyphase filtering


In the transmitter of Figure 5.41, the digital upconversion to RF consists
of two subblocks: an expander and a filter. This is similar to the L-fold
interpolator of Figure 5.20(a) with a minor difference that the lowpass
filter H(z) is replaced by a bandpass filter in Figure 5.41. This has no
consequence on any structure that may be used for its implementation. The
polyphase structure of Figure 5.20(c) and hence the commutator model of
Figure 5.21 is thus applicable.
A point that needs attention here is that the input to the interpolator
(modulator in the case of interest here) and thus polyphase filters R0 (z),
R1 (z), · · · operate at a rate which is L (L2 , here) times slower than the
output rate. Therefore, even though the sampling rate at the DAC input in
Figure 5.41 may be in the order of Giga samples per second, the polyphase
filters need to operate in a lower rate. In order to allow proper operation of
the interpolator/modulator, the polyphase filters run in parallel, complete
computation of the outputs y0 [n], y1 [n], · · · simultaneously, and store the
results in a set of buffers (registers) before taking the next sample of the
input and beginning the next cycle of the filtering operation. The stored
samples in the buffer are then successively passed to the output by the
commutator while the next set of output samples are being computed. This
modification to Figure 5.21, which is presented in Figure 5.45, results in a
delay of the output samples equivalent to one sampling period at the rate
of input or L sampling periods at the rate of output.

Receiver parallel polyphase filtering


Following the same line of argument, one finds that the digital down-
conversion to IF block in the all digital QAM receiver of Figure 5.44 is
similar to the M -fold decimator of Figure 5.18(a). Hence, the polyphase
implementation of Figure 5.18(c) and thus the corresponding commutator
model presented in Figure 5.22 is applicable. Also, in order to allow opera-
tion of the polyphase filter at the output rate (the lower rate in the system)
buffers need to be placed between the commutator and the polyphase filters.
Problems 147

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.

2. In Example 5.1, we noted that when a discrete-time signal x[n] is


interpolated L-fold, through the cascade of an L-fold expander and a
lowpass filter, to keep the level of signal samples at the output similar
to those at the input, the gain of the lowpass filter should be set equal
to L. The goal of this problem is to develop an understanding of this
point.

(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.

x [n] xe [n] xef [n] y[n]


↑L H (z ) ↓L

Figure 5.46: Cascade of an interpolator and a decimator.

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.

7. Verify the commutative rules shown in Figure 5.17.

8. Find type 1 and type 2 polyphase representations of H(z) =


12 −n
n=0 (n + 1)z with respect to the parameter M = 4.
7
9. Repeat Problem 8 when H(z) = n=−7 0.5|n| z −n and M = 3.

10. Repeat Problem 8 when

(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.

(a) Identify the polyphase components E0 (z), E1 (z) and E2 (z).


(b) Simplify the structure of Figure 5.25 further by replacing the
2-fold expanders and the following filters (the polyphase compo-
nents) by proper interpolation polyphase structures.
(c) Discuss the advantages that the structure developed in Part (b)
offers when the resampler has to run at a very high speed.
150 Multirate Signal Processing Chap. 5

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).

16. Consider the filter specification in Problem 15.

(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.

17. Consider Example 5.3, where we studied the complexity of a 100-


fold interpolator with parameters L1 = 2 and L2 = 50. Repeat the
example for the case where L1 = 4 and L2 = 25. Compare the
computational complexity of this design with the one in Example 5.3.

18. Following the multistage structure shown in Figure 5.30, we wish to


design a decimator with the decimation factor M = 10. The an-
tialiasing filter H(z) has to be designed according to the following
specifications: δ1 = δ2 = 0.001, f1 = 0.03, f2 = 0.04. By examining
all possible choices of M1 and M2 , determine the best combination
Problems 151

of M1 and M2 that results in an implementation with the least com-


plexity. Measure the complexity by counting the number of additions
and multiplications required for each sample of the input, x[n].

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;

Compare the results here with those in Problem 20.

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.

cos(2π(fc − fIF )nTs,RF )

xIF [n] xIF,e [n] xIF,e [n] xRF [n] xRF [n]
↑ L2 H(z) ⊗ G(z)

Figure 5.47: Direct digital implementation of up-conversion block of Fig-


ure 5.39

24. This problem studies the computational complexity of the modulator


structure shown in Figure 5.41 and compares the result with that
obtained in Problem 23. We note that the digital upconversion to RF
block in Figure 5.41, has the same structure as the first two blocks
(↑ L2 and H(z)) in Figure 5.47. Noting this, evaluate the number
of multiplications and additions that is required for computation of
each sample of the output xRF [n] and compare the results with those
in Part (b) of Problem 23.

Vous aimerez peut-être aussi