Professional Documents
Culture Documents
Abstract-In this paper a general theory of multistage decimators and back to the original frequency. They proposed a multistage
interpolators for sampling rate reduction and sampling rate increase is procedure for sampling rate reduction by alternately fdtering
presented. A set of curves and the necessary relations for optimally de-
with half-band filters and reducing the sampling rate by factors
signingmultistage decimators is also given. It is shown that the pro-
cesses of decimation and interpolation are duals and therefore the same of 2 until a desired power of 2 sampling rate reduction was
set of design curves applies to both problems. Further, it is shown that achieved. They then used a reverseprocess for interpolating
highly efficient implementations of narrow-band finite impulse response back to the original sampling frequency. Shively [9] has also
(FIR) fiiters can be obtained by cascading the processes of decimation suggested a multistage process for integer sampling rate reduc-
and interpolation. Examplesshowthat theefficiencies obtained are
comparable to those of recursive elliptic filter designs.
tions for which the sampling rate reduction at each stage can
be greater than two. He proposed a procedure for optimally
choosing thereduction ratios at each stagesuch thatthe
amount of computation in the overall sampling rate reduction
I. INTRODUCTION process was minimized.
I
DECREASE
SAMPLING _I y(n)
RATE BY
M \I
SAMPLING-
T R A T F BY LpF SAMPLING
RATE
M BY
signal x(n) with a low-pass filter giving the signal w(n). The
sampling rate reduction is then achievedby forming a new
sequence y(n) byextracting every Mth sample of w(n). A
block diagram of these operations is given in Fig. l(a). Fig.
l(b) shows typical Fourier transforms ofthe signals x(n),
I
w(n>,and.Y(n). I
-L I y(n)
INCREASE DECREASE
The process of interpolating a signal x(n) by an integer SAMPLINGw(n1
RAT5 BY LpF __ SAMPLING
RATS BY
ratio L is, similarly, depictedin Fig. 2. In this case the sampling I
rate of a signal x(n) is increased by the factor L by inserting fr - l-L
Lf _ _ - _ - _ _ Lfr
L'_____ _ _ _ _ - L ICM f,
.I.
GENERAL INTERPOLATOR/DECIMATOR
L-1 zero-valued samples between each sampleof x(n). This (b)
creates a signal w(n) (with sampling rate Lfr) whose frequency Fig. 3 . (a) Cascade of an interpolatorand a decimatorforachieving
components are periodic with period equal to the original samplingratechangesby noninteger factors. (b) More efficient im-
sampling frequency f, as shown in Fig. 2(b). To eliminate plementation of this process.
these periodic components and retain only the baseband fre-
quencies it is necessary to filter the signal w(n) with an appro- examine this process we recognize that the two low-pass fdters
priate low-pass filter.' The resulting signal y(n) with sampling are operating in cascade and at the same sampling rate. Thus a
rate Lf, is then the desired interpolated signal. At the bottom more efficient implementation of the overallprocess can be
of Fig. 2(b) the Fourier transform of the signal y(n) is shown. achieved if the filters are combined into one composite low-
Thus far, we have only considered sampling rate increases or pass filter [4] as shown in Fig. 3(b). The system of Fig. 3(b)
decreases by integer ratios. If sampling rate conversions be- corresponds to a general interpolation or decimation module
tween rational integer ratios of sampling frequencies are de- depending upon whether L is greater or less than M . If L = 1,
sired this can be achieved by a combination of the two above this general module becomes the integer decimator of Fig. 1
processes. That is, if we desire a sampling rate conversion by a and, if M = 1, it becomes the integer interpolator of Fig. 2.
ratio L / M (where L and M are integers) we can achieve this by The design of the low-pass filter (i.e., specification of cutoff
first interpolating by L and then decimating b y M as shown in frequencies and ripples) in this general module for sampling
Fig. 3(a). It is important to recognize that the interpolation rate change will be explained in Sections I11 and IV.
process hust precede the decimation process to retain the de- An extremely important consideration in the implementa-
sired frequency band in the final output (except in the case tion of the sampling rate changing system of Fig. 3(b) is the
when the original signalis sufficiently band limited). If we choice of the type of low-pass fdter [4]. For this type of sys-
tem, a significant savings in computation can be obtained by
'To retain the same signal energy at the high sampling rate the pass- using an FIR filter in a standard direct form implementation.
band gain of this filter must be equal to L [ 4 ] . For this case, the filter output v(n) is computed from the in-
446 TRANSACTIONS
IEEEACOUSTICS,
ON
SIGNAL
SPEECH,
PROCESSING,
AND OCTOBER 1975
N- 1
u(n)= h(m)w(n- m )
m=o
i=1
Di. (3)
ments on the low-pass filters at each stage. Bellanger et al. [SI
In Fig. 4(b) IX[exp j(27rflfu,,)JI represents the magnitude of
and Nelson et al. [8] also have implemented sampling rate re-
the spectrum of x ( n ) and I Y[exp j ( h f l f r K ) ] I corresponds to
ductions usingseveral decimation stages;however they re-
the magnitude of the spectrum of y(n). From the sampling
stricted their results by only using factors of 2 at each stage.
theorem, we recognize that the highest frequency in y (n) is
Shively [9] considered a more general approach with integer
decimation for a two-stage design similar to that of Fig. l(b).
f,which i s
He also suggested a procedure for optimizing the two-stage de- f,<-.
frK
sign by properly choosing the decimation ratios of each of the 2
stages. In this section we extend and generalize the work of Because of practical considerations in the design of the low-
Shivelyusing the more general decimation stage shown in pass filters used in the decimationprocess, this bandwidth can
Fig. 3(b). Design curves and formulas are presented for imple- never be fully realized andthe usable portion of the base-
menting optimum decimators for a wide range of parameters band willalwaysbe somewhat less than f,. We denote this
and conditions. bandwidth as being froh zero to f p corresponding to the band
The basic multistage process for sampling rate reduction over which the magnitude response of the composite of the
with K stages is illustrated in Fig. 4(a) and a frequency domain low-pass filters remains flat within specified tolerance limits of
interpretation of this process is given in Fig. 4(b). The initial 1 k 6,. Also because of practical considerations a inakimum
sampling rate is fro and the fmal sampling rate is f u i with in- toierance must be allowed for the magnitude response of the
termediate sampling frequencies designatedas f r l , f r 2 , . . *, low-pass filters in the stopband and this will be denoted as 6,.
f r ( K - 1 ) . The sampling rate reduction achieved by each stage We can now focus on the design requirements for each stage.
-
of the decimation process is denoted as D i , i = 1 , 2 , .,K and We will permit the most general form for each stageasdis-
therefore the intermediate sampling frequencies are given by cussed in the previous section [see Fig. 3(b)] . This form for
stage i is illustrated in Fig. 5(a). Li corresponds to the sam-
pling rate increase and Mi corresponds to thesampling rate de-
crease for stage i. As there is a net sampling rate reduction
this implies,Mi >Li. Then
2This does not imply that greater efficiencies can be obtained by si-
multaneously increasing L and M as both Nand the sampling rate in (1)
are proportional to L .
CROCHIERE AND RABINER: FIR DIGITAL FILTER XMPLEMEMTATIQNS 447
/AFTER SAMPLING
‘f RAPE REDUCTION
\ TO f,i
(b)
‘The duration of the unit sample response, Ni, can,in turn, be
Fig. 5 . (a) Stage i of a K-Stage decimator. @) I’requency response rep-
resentation of the low-pass filter requirements forstage i. derived from the required filter specifications of the low-pass
filter in stage i.
Design procedures and relations for designing optimal FIR
and from (2) the net decimation ratio Difor stage i is given as filters of the above type have been well established. Given the
desired ripple specifications and cutoff frequencies an approxi-
Mi.
1). =- mate relation for the necessary unit sample response duration
Li N is given as4 [lo] [l I]
The requirements on the low-pass filter for stage i can be de-
termined with the aid of Fig. 5(b). The passband requirement
must be such that it is flat from zero to fp in order to avoid
distorting the baseband response. As it isdesired thatthe where
overall passband ripple for the composite of K stages be main-
At; width of the transition band normalized to the sampling
tained within 1 ? 6,, it is necessary to requkre more severe
frequency
constraints on the individual filters in the cascade. A con-
venient choice which will satisfy this requirement is to specify Dw(61 6,) = [5.309 x (log10
the passband ripple constraints for each stage i to be within
-6 7.114 X (loglo 6,)
1 k bpi where = 6,/K. In thestopbandthe ripple con-
straint for the composite filter niust be 6, and this constraint - 0.47611 loglo 6 2 - [2.66 X low3(loglo
must be imposed on each of the individud low-pass filters as
well, in order to suppress the effects of aliasing? Finally, to -t 0.5941 OOglo 6 1) + 0.4278 J (1 0)
assure that no high frequency components are aliased into the f(61,62)=0.5f244loglo (61/62)+ 11.01217
baseband at stage i, the stopband cutoff frequencyof the low-
pass filter i can be chosen to be fri - &. At the final stage, K , S I tolerance in the magnitude response in the passband
it can be seen that this cutoff frequency is then equal to f s as 62 tolerance in the magnitude response in the stopband.
desired sincefrK = 2 f,.
.Thusfar, we have established the basic framework for a In the particular application that we are considering here most
of the stages will have relativelynarrow-band filters, especially
multistagedecimatorand havespecified therequirements
in cases where decimation ratios D are greater than 10 or so.
which must be met at each stage. Given that the requirements
Generally, AF in (9) willbeTelatively small and the second
fro, f,,fp, 6, and 6, are known, the next consideration
~ is that
two terms on the right side of (9) will be relatively insignificant
of optimizing the design for maximum efficiency. The flexible
compared to that of the first tern. With this in mind we can
parameters that we have at our disposalare thedecimation
argue that a further approximationof (9) to the form
ratios D j , i = 1, 2, . * K , as well as K . The function to be
e,
ments we can now determine the length of the unit sample where
response Nifor stage i. Letting
61 = Sp/K
6* =6,
(18b)
This is the fmal form that we desire.
We can now minimize RT by selecting the number of decima-
tion stages K and then minimizing RT in terms of the decima-
tion ratios which can be assumed to be continuous variables.
From (2), (6), ( 9 , and (12) thecomputation rate Ri in By comparing values of RT for these various values of K we
MADS/s for stage i can be expressed in the form can then optimize the number of stages. Typically the opti-
mum number of stages will besomewhere between 1 and 4.
For K = 1 there is no flexibility in choosing decimation
ratios (Dl = 0 ) . For K = 2 , R Tis a function of one variable,
By applying (7) the total computation forstages 1-K is given as D l . To minimize RT we can take its derivative with respect to
D l and set it to zero. This yields a quadratic function in D l .
It leads to two solutions for D l , only one of which is valid,
and can be given as
and with theaid of ( 2 )and (3) this can be expressed in the form - 2D(1 - .\/DAf/(2 - Af))
D'opt - 2-Af(D+1) ' K=2
and
D2,p* = D/D1 3 K=2.
i=l
deal with and to grasp intuitively. For example, we can ob-
serve the effects that SP and 6, have on RT by examining the
Therefore DK must be eliminated from (15 ) before attempting behavior of Da(Sp/K, 6,). In Table I this function is tabulated
to minimize RT. Otherwise the optimization procedure will for some typical values of 6, and 6, and for K = 1, 2 , - . -,6.
fail. From this table we can also observe the effect of K on
At this point it is also convenient for later notational pur- D,(6,/K, 6s). For example, in going from a one-stage design
poses to define a new parameter (K = 1) to a two-stage design (K = 2), D,(GP/K, 6), increases
typically by a factor of approximately 10 percent. This is a
reflection of the increased amountofcomputation that is
This is simply an alternative to expressing both f , and f p . It required due to the fact that the passband ripples of the two
has the interpretation that itis a relative measure of the transi- cascaded filters in the two-stage design must be made smaller
tion band between f , and f p . For example if Af is 0.25 then in order to retain a composite ripple of S p . Aswe willsee
the passband, 0 to f,, occupies threequarters of the new shortly, this variation of D,(6JK, )6; with respect to K is
baseband. relatively insignificant compared to the variation of S with
Upon substitution of (16) and (17) into (15) we get the fiial respect to K . In other words we conclude that the choice of
objective function the optimum number of stages is not strongly affected by the
choice of 6, and S,, but rather, on the choice of Af and D .
Perhaps the more interesting function in (1Sa) is S. For a
( W
given number of stages RT is minimized by minimizing S. To
ABINER: AND
CROCHIERE 449
*. A f = 0.5 / Af =0.05
/
/
1
1
f
1 1000 10 100
D
bf = 0.02
(a)
c /
100
10
1
1 10 100 1000
D
D (e)
(bl
D D
(C) (f)
1
E
bt = 0.5 Af.0.05
=g- fp
-
1000 fS tooo~
1
D
(a1
: Af.0.2
10007 STAGE
1
D
D (9)
(bl
1000
1 =O”
STY
t
i
I
?00
Di
K=4 10
10 100 1000 1
D D
IC) (f)
metry of the impulse responses of the filters and require only Therefore wehave two alternatives whichappear to be
half of the number of multiplications, orapproximately promisiig for the above design, both which require approxi-
36 365 multiplications/s. mately the same amount of computation. Another considera-
An alternative approachmightbe to consider a two-stage tion in comparing these deiigns might be the required filter
designas opposed to a three-stage design. In t h i s case the order for each stage. By applying (2) and (17) into (12) an ex-
optimum decjmation ratios from Fig. 7(c) are D l e 10.3 and pression for this filter order can be given as
D 2 1.95. Practical values for these ratios would be D l = 10
and D z = 2. From (18a) and (18b) we can determine RT for
this design is to be RT 7 1 850. Again we can take advantage
of symmetry and implement the design with approximately
35 925 multiplications/s.
452 IEEE TRANSACTIONS ON ACOUSTICS, SPEECH, AND SIGNAL PROCESSING, OCTOBER 1975
TABLE I1
S RT
fr K fr(K-l) fr(K-2) fr$ fr 0
(0)
1 1.63 20.0 326 000
4 2 3.9 71 760
-INPUT SAMPLING RATE
7 3 3.3 65 010
4 2.06 3.3 67 980 SAMPLING RATE
b f s frK fr(K-l)
sampling rate, low-pass filtering, and interpolating back. This put pointy(0) iscomputed by notingthat
is because the gain in efficiency monotonically increases as D N- 1
increases(seeFig. 6). Therefore it isalways preferable to y(0) = u(0) = h(m) w(0 - m)
make D as large as possible and to use optimal designs for the m=o
decimation and interpolation stages. By the same argument, if
where N = (2L. Fig. 11 (a) and (b) show h(m) and w(0 - m)
we wish to simultaneously low-pass filter a signal and perform
respectively where w(m) is constructed from x(n) by inserting
a sampling rate conversion, it is always most efficient to op-
L - 1 zero-valued samples between the samples of x(n). It is
timally decimate to the lowest permissible sampling rate first
then easy to see that
and then interpolateto thenew output sampling rate.
In a companion paper [6] some additional interesting prop- ~(O)=h(O)~(O)+h(2)~(-l)+h(4)~(-2)+h(6)~(-3).
erties of these decimator-interpolator filters are discussed.
To compute the pointy(1) we note that
VI. ADDITIONALPRACTICALCONSIDERATIONS IN THE N- 1
IMPLEMENTATION OF DECIMATIONAND y(1) = 4 3 ) = h(m) w(3 - m).
INTERPOLATION STAGES m= 0
In SectionI1 we demonstrated that each stage of a decimator The sequence w ( 3 - m) is illustrated in Fig. 1l(c). Comparing
or interpolator can generally be in the formgiven in Fig. 3(b), the curves of (a) and (c) we see that y(1) can be computed as
and that for the specific cases of integer decimations and in-
teger interpolations this form reducesto those of Fig. l(b) and
~(1)=h(l)~(l)+h(3)x(O)+h(5)x(-l)+h(7)~(-2).
Fig.2(b), respectively, In practice theimplementation of Similarly, referring to Fig. ll(a) and (d), y(2) canbe com-
these modules can be very complicated [particularly the gen- puted as
eral module in Fig. 3(b)] , since it involves signals at several
different sampling rates and also involves keeping track of N- 1
~ ( 2 =) ~ ( 6=) h(m) ~ ( - 6m)
when multiplications must be performed. In t h i s section we m=o
present a straightforward methodof implementing this general
stage which alleviates many of these problems. For the case of = h(0) x(3) + h(2) x(2) + h(4) x(1)
integer decimations or interpolations the approach simplifies
+ h(6) x(0).
accordingly.
Assume that the length of the unit sample response of the In the computation of each output point y(n), x(n) is se-
low-pass fiter in Fig, 3(b) is N . L - 1 out of every L samples quentially addressed for Q of its values. According to (42), it
of w(n) are of zero value, and therefore the computation is mustthen beadvanced by [nM/L] forthecomputation of
proportional to NIL since the unit sample response spans ap- thenextoutputpoint. Also h(n) must be addressedby
proximately NIL nonzero samples. Schafer and Rabiner' [4] (kL + (nM) @ L ) . Alternatively, h(n) can be addressed sequen-
have observed that if N is chosen to be tially if the samples of h(n) are stored in anappropriate
scrambled order. That is, to compute y(0) the sequence of Q
N=QL (41) samples go(n) =h(O),h(L), * * * ,h((Q - 1) L ) is required. To
where Q is an integer, then the unit sample response will span compute y(1) the sequence of Q samples g,(n) = h(M @ L ) ,
exactly Q nonzero samples of w(n) for each filter cycle. We h(L + M @ L ) , . * * , h((Q - 1) L + M @ L ) is required. To
assume for convenience that N is chosen such that it satisfies compute y (L - l), the sequence of Q samples gL-l(n) =
this condition. It is then possible to express the computation h(((L - 1) M ) @ L ) ,h(L + ((L - l ) M ) @ L ) , * * ,h((Q - 1) L +
of an output point y ( n ) in the form ((L - 1) M ) @ L ) is needed. Finally, to compute y ( L ) the se-
quence go@) is again required and the cycle repeats. There-
fore, if the coefficients of h(n) are arranged in the scrambled
order, as shown in Fig. 12, they canbe addressed in a se-
quential manner for the calculation in (42). On each computa-
where ( ) @ L implies the quantity in parentheses modulo L tion of an output point y(n), one block of Q coefficients is
and [ ] corresponds tothe integer partof the number in sequentially addressed. For the computation of the next out-
brackets. The sequence h(n), n = 0 , l , * , N - 1 contains the put points y(n + l), * * * ,y ( n + 2), * * . ,y ( n + L - l), the ad-
coefficients of the direct form FIR filter or equivalently the dress pointer is indexed sequentially until it hascycled tbrough
samples of its unit sample response. Equation (42) was deter- all L sequences go(n), g,(n), . . . ,gL- (n) at which point the
mined empirically from several examples. It has the general address pointeris reset and the cycle begins again.
characteristics of a convolution and when M = L = 1 it be- This approach provides an efficient way of handling the data
comes the convolution equation as expected. in a general section. For L = 1 or M = 1 it simplifies accord-
To illustrate the relationship depicted by (42) we will ex- ingly and, if L = M = 1 , then it is equivalent to a straightfor-
amine the case where L = 2, M = 3, and Q = 4. The first out- ward direct form convolution. If the assumption on the length
of the impulse response (41) is not made, asimilar formulation
'In [4] the additional constraint that N be an oddintegerwas im- results in which the sequences go(n)-gL-l (n) are not allof
posed; here this constraint need not be applied. equal length.
456 IEEE TRANSACTIONS ON ACOUSTICS, SPEECH, AND SIGNAL PROCESSING, OCTOBER 1915