You are on page 1of 5

IEEE TRANSACTIONS ON CIRCUIT THEORY, VOL. CT-20, NO.

6, NOVEMBER 1973 697

The frequency-domain case,” IEEE Trans. Circuit Theory, vol. Trans. Circuit 7’heory (Corresp.), vol. CT-16, pp. 235-237, May
;T-l6;6~~3??-337, Aug. 1969. 1969.
PI Automated network biasing,” M.S. thesis, Univ. [14] R. Fletcher and C. M. Reeves, “Function minimization by con-
Chifornia, ‘Berkeley, 1969. jugate gradient,” Comput. J., vol. 7, pp. 141-153, 1964.
PI S. W. Director and R. A. Rohrer, “On the design of resistance [15] R. Fletcher and M. J. D. Powell, “A rapidly convergent descent
n-oorts bv digital commuter.” IEEE Tkans. Circuit Theorv. _ vol. method for minimization,” Comput. .I., vol. 6, pp. 163-168,
CT-16, pp. 337-346, A;g. 1969. 1963.
[lo] B. A. Wooley, “The computer-aided design optimization of inte- 161 S. W. Director and R. A. Rohrer, “The generalized adjoint net-
grated broadband amplifiers, ” in I9 70 IEEE Solid-State Circuits work and network sensitivities,” IEEE Trans. Circuit fieory,
Conf: Dig., pp. 84-85. vol. CT-16, pp. 318-323, Aug. 1969.
[ 111 D. A. Calahan, “Optimization of switching circuits,” in Proc. 2nd 171 W. A. Bristol, “The automated design of linear integrated circuit
;iemz~ Cornell Electrical Engrneenng Conj: , Oct. 1969, pp. amplifiers,” Ph.D. dissertation, Dep. Elec. Eng., Univ. Florida,
Gainesville, 1972.
[12] T. w. H&ton and L W. Read “Computer-aided design of 181 W. J. McCalla, “Computer aided design of integrated bandpass
broadband and low-noise microw&e amplifiers,” IEEE Trans. amplifiers,” Ph.D. dissertation, Univ. California, Berkeley,
Microwave Z%eory Tech. (Corresp.), vol. M’IT-17, pp. 612-614, 1972.
Aug. 1969. 191 J. Logan, “Characterization and modeling for statistical design,”
[ 131 G. C. Temes and D. Y. F. Zai, “Least pth approximation,” IEEE Bell Syst. Tech. J., vol. 50, no. 4, pp. 1099-1104, Apr. 1971.

A Unified Approach to the Design of


Optimum FIR Linear-Phase Digital Filters
JAMES H. MCCLELLAN AND THOMAS W. PARKS

Abstract-A method for designing finite-duration impulse-response the weighted Chebyshev(min-max) sense. Several authors have
(FIR) linear-phase digital filters is presented in which the four possible considered this problem. The frequency-sampling method has
casesfor such filters are treated in a unified approach. It is shown how
to reduce each case to the proper form so that the Remez exchange
been applied to the design of low-pass and bandpass filters
algorithm can be used to compute the best approximation to the [l] , [2] , as well asto wide-band differentiators [3] . However,
desired frequency response. The result is that a very flexible and fast the frequency-sampling technique does not yield optimal
technique is available for FIR linear-phase filter design. Chebyshev filters, nor does it allow for the exact specification
of bandedge frequencies.
Herrmann [4] and Hofstetter et al. [5] employed a method
I. INTRODUCTION
which resulted in a restricted class of optimum Chebyshev

F INITE-DURATION impulse-response (FIR) linear-phase


digital filters have several important properties which
make them attractive for digital signal-processing applications.
filters, called extraripple filters [6]. The Chebyshev design
problem with specified bandedge frequencies has been solved
in the case of low-pass filters, and the Remez algorithm was
Among these features are the exact linear phase, the absence shown to be a very efficient means for computing the best
of any stability problems asare encountered in infinite impulse- approximation [7] . Linear programming can design the same
response filters, and the availability of efficient iterative design filters; however, the computation time required for linear pro-
methods. The design problem for such filters can be stated gramming is far greater than for the Remez algorithm [8] .
loosely asthe approximation of an idealized magnitude shape in Until now, the efficient design procedures have been re-
stricted to special filter types and the general procedure (linear
Manuscript received February 9, 1973; revised May 18, 1973. This programming) is comparatively slow. The objective of this
work was supported by the National Science Foundation under Grant
GK 23697. paper is to present a comprehensive summary of the linear-
J. H. McClellan (S’69) and T. W. Parks (S’66-M’67) are with the phase FIR falter design problem and to unify the design of the
Department of Electrical Engineering, Rice University, Houston, Tex.
77001. four types of filters in order to apply the Remez algorithm.

Authorized licensed use limited to: Imperial College London. Downloaded on September 03,2022 at 21:59:43 UTC from IEEE Xplore. Restrictions apply.
698 IEEE TRANSACTIONS ON CIRCUIT THEORY, NOVEMBER 1973

Thus it is now possible to approximate bandpass, bandstop, so again B = -(N - 1)/2, but the symmetry is different. h(O) =
Hilbert-transform, and differentiator filters, as well as arbitrary -k (N - 1), k (1) = -k(N - 2), . . . , etc. This symmetry will be
filter specifications using the Remez algorithm. called negative symmetry.
Now we examine the form of the function G(F). Different
II. FOUR TYPES OF FIRLINEAR-PHASE FILTERS functions result depending on whether N is even or odd and
An FIR digital filter of length N with impulse response whether the symmetry required for linear phase is positive
{h(k)}, k=O, 1, * * * , N - 1, has a frequency response which is or negative.
the z-transform evaluated on the unit circle (z = eiznq:
A. Positive Symmetry-Odd Length

H(F) =~(z)lz,,j2nF = rc: h(k)emiznkF. G(F) = t a(k) cos 2nkF (1)


k=Q

By a linear-phase fflter we mean that the frequency response where n = (N - 1)/2, a(0) = h(n), and a(k) = 2h(n - k), for
can be written as k= 1,2;**,n. This is the case which was considered in an
earlier paper by the authors [7].

where A and B are constants and G(F) is a real-valued function. B. Positive Symmetry-Even Length
Notice that G(F) is not the magnitude of the frequency
response since it can be negative, but 1GQ 1is the magnitude. G(F)= 2 b(k)cos2n(k-+)F (2)
First we show that A = 0 or rr/2. We can restrict A to lie k=l
between 0 and n because a minus sign can be incorporated
into GQ. Since I GQI is the magnitude response, lG(F)lis where n=N/2 and b(k)=2h(n- k), for k=O, 1, .**, n.
an even function. Thus G(F) is either an even function or an Recently, Rabiner and Herrmann have applied linear program-
odd function. ming to this case [9].
Recall that H*(F) = H(-F). If G(F) is even, then
C Negative Symmetiy-Odd Length
G(-F) ej(A-B2nF) = H(-F) = H*(F) = G(F) emj(A+B2flF).

This implies that eiA = e-jA , and thus A = 0. If G(F) is odd, G(F) = 5 c(k) sin 2?rkF (3)
then -eiA = emiA and A = n/2. Note that when A # 0 we have k=l
a fixed delay, but not linear phase in the usual sense.
Now we show that B = -(N - 1)/2 and that there are two where n=(N- I)/2 andc(k)=2h(n- k),fork= 1,2;** ,n.
types of symmetry for the impulse response, depending on In order that GQ be odd, we must have h(n) =.O. Herrmann
Fhether G(q is even or od$. If.G(F) is even, then defining [lo] used this type in designing Hilbert transform filters.
He(z) = zmBH(z), He(F) = He(212nF) is purely real because
D. Negative Symmetry-Even Length
He(F) = G(F). Thus He(F) = H,*(F) = He (-F) and writing
this out,
G(F) = 2 d(k) sin 2n(k - +)F (4)
N-l N-l k=l
kTo h(k)z -B-k = go h(k)zB+k
where n =N/2 and d(k) = 2h(n - k), for k = 1, 2, * * * , n.
Differentiators have been designed for this caseby using linear
N-l
zZ2B+N-l C h(N- 1 _ ,qz--‘, programming [B] .
k=O A unified approach to the approximation problem results
when G(F) is rewritten using (S)-(7) in the form G(F) =
for z = ej2nFS Q(F)P(F), where P(F) is a linear combination of cosine
Thus B = -(N - 1)/2 and equating coefficients yields h(0) = functions:
h(N- 1) *..h(k)=h(N- l-k),fork=O,l;**,N- l.This
symmetry of the impulse response will be referred to as 5 b(k) cos 2n(k - ;)F = cos nF ‘5 b(k) cos 2nkF (5)
positive symmetry. k=l k=O
If G(F) is odd, A = n/2 and with s,,(z) = zeB$z), He(F) is
purely imaginary since He(F) = jG(F). Thus He(F) = -HG (F> = 2 c(k) sin 2rkF = sin 2nF ng E(k) cos 2rkF (6)
-He(-F), which is written as k=l k=o

N-l N-l n-1 _


c h(k)zWBek =- x h(k)zB’k, for z = ejZnF f’ d(k) sin 2a(k - 3) = sin rrF c d(k) cos 2nkF. (7)
k=O k=O k=l k=O

Authorized licensed use limited to: Imperial College London. Downloaded on September 03,2022 at 21:59:43 UTC from IEEE Xplore. Restrictions apply.
MCCLELLAN AND PARKS: DESIGN OF DIGITAL FILTERS 699

Note that G(F) is constrained to be zero at either F = 0 and/or First, we state the approximation problem for linear-phase
F = 0.5 by (5)-(7). filter design. Let the sampling frequency be normalized to
E. Proof of (51-17) one; then the magnitude response is completely specified in
Recall the trigonometric identity the frequency interval [0, 31. Given a compact subset 3 of
[0, 31, a desired function D(F) defined and continuous on 3,
coskcosB=$[cos(A+B)+cos(A-B)]. a positive weight function W(F) defined and continuous on
Substituting this into the right-hand side of (5) we get 3, and one of the four types of linear-phase filters which deter-
n-1
c b(k) cos nF cos 2nkF = f ng’ b(k) [ cos 2r(k + $)F+ cos 2n(k - ;)Fj = $ 2 b(k - 1) cos 2n(k - +)F
k=O k=O k=l

n-1
++ c i(k) cos 2a(k- $)F= 3 b(0) cos 2n(-3)F
k=O

n-1
+3 c [b(k)+i(k - l)] cos 2n(k- +)F + +b(n - 1) cos 2r(n - $)F.
k=l

Thus mines the form of G(F), then one seeks to minimize


IIE(F)II = pi+ W(F) ID(F) - G(F) I by choice of G(F).
b(i) = b(0) + 3 b(l)
The formulation of the problem on a compact subset of
b(k)=+(b(k- l)+b(k)), k=2,3;**,n- 1 [0, 31 allows the designer to do multiband filter design by
b(n)=+b(n- 1). specifying the desired response on subintervals of [0, 31.
For example,
F. Proof of (6) 0, FE [0, 0.101
Use the trigonometric identity D(F)= 1, FE [0.2,0.35] (9)

{ 0, FE [0.425,0.5]
cosAsinB=+[sin(AtB)-sin(A-B)]
specifies a bandpass filter.
and proceed as in the proof of (5) to obtain The set 3 is 3 = [0, 0.11 U [0.2, 0.351 U [0.425, 0.51 and
D(F) is continuous on 3 because transition regions have been
c(1) = E(0) - 3 E(2) inserted at the jumps of D(F). When, as in (l), G(F) isa
c(k)=+[E(k- l)- E(kt l)], k=2,3;. ,n-2 linear combination of cosines, the alternation theorem [l l]
states the necessary and sufficient conditions which must be
c(n - 1) = 3 t(n - 2) satisfied by the unique best approximation. However, in the
c(n) = 4 E(n - 1). other cases, the alternation theorem cannot be applied
directly.
Equation (7) is derived in the same manner, resulting in the However, using (8) we can formulate an equivalent approxi-
following relations between the coefficients: - mation problem to which the alternation theorem can be
applied. Observe that
d(l)=&O)- +&I)
W(F)ID(F) - Q(F)P(F)I = W(F)Q(F) Dg - P(F) (10)
d(k)=+ [i(k- i)-;(k)], k=2,3;**,n- 1
d(n) = 3 d(n - 1). except possibly at the end points, where Q(F) = 0. So (10) is
true on 3’C 3, where 3’ i% a compact subset of 2 and
III. FORMULATIONOFTHEAPPROXIMATIONPROBLEM Q(F)>0 on 3’. Letting D(F) = D(F)/Q(F) and W(F) =
ANDITS~OLUTION W(F)IQ(F), the problem becomes that of minimizing
In this section we will show why it is convenient to rewrite llE(F)ll=;y, $(F)lDh(F) - P(F)1 (11)
the function G(F) in the general form:
by choice of P(F), where P(F) is a linear combination of
G(F) = Q(F)PtF). (8)
cosines.
Equation (8) leads to a very clear and compact statement of The problem is not exactly the same because the set 3 has
the necessary and sufficient conditions for the optimality of been replaced by 3’. For example, in (9), if the length of the
the best Chebyshev approximation, as well as to a compact approximating filter were even, then Q(t) = 0 and 3could be
method for computing this best approximation. modified to get 3’ = [O,O.l] U [0.20,0.35] U tO.425, (0.5 -

Authorized licensed use limited to: Imperial College London. Downloaded on September 03,2022 at 21:59:43 UTC from IEEE Xplore. Restrictions apply.
IQ0 IEEE TRANSACTIONS ON CIRCUIT THEORY.NOVEMBER 1973

4 4
Bandpass Ditferentiator

Frequency

initial
1
Guess for r+l
Extremal Frequencies

1
REMEZ
Solve the
Approximation Problem

I
Calculate Impulse
Response Eqns. l-7

I
Print out the
Optimal Error 8
Impulse Response
Fig. 1. Illustration of the alternation theorem for a length 16 differen-
tiator. Slope error = 0.0136 with 9 extremal frequencies. Fig. 2. Block diagram of the design program.

TABLE I P(F) = Zi:b cr(k) cos 2nkF), then a necessary and sufficient
condition that P(F) be the unique bestiweighted Chebyshev
NEGATIVE
NEGATIVE approximation to a continuous funztion e(F) on 3’ is that the
weighted error function E(F) = W(F) [D(F) - P(F)] exhibit
at least r+ 1 extremal frequencies in 3’. That is, points Fit
G(F) = sin
n-1
ZTIF X7(k) co5 P”kF
such that F1 < F2 * * * <F,, <F,,+ 1, E(Fi) = - E(Fi+l), i =
k=O 1,2;** , n, and 1E(Fi) I = max E(F). Consider the application
n = (N - 1)/Z
FEY
G(O) = G@) = 0
of the alternation theorem in the case of approximating a
At least (N-1)/2 + 1
wide-band differentiator. The normalized frequency response
extrema1 frequencies
of an ideal differentiator is H(F) = jF, so D(F) = F. Also, to
n- 1, get an error which is proportional to D(F), let W(F) = l/E;.
G(F) = sine r. d(k)
k=O
cos ZnkF Thus E(F) = l/FlF - Q(F)P(F)I. Fig. 1 illustrates the alter-
n = NJ2 nation of the error curve for N = 16 (i.e., r = 8 and 9 extremal
G(O) = 0 frequencies). Table I summarizes the conclusion of this
At least N/2 + 1 theorem for the four casesbeing considered.
extrema1 frequencies

IV. CALCULATIONOFTHEBESTAPPROXIMATION
The above development not only unifies the theory of
E)] , where E is a small positive number. As a matter of fact, linear-phase filter approximation, but it also motivates a unified
D(F) should be specified to be zero at any frequency, where technique for computing such approximations with the power-
G(F) = 0. Otherwise, there will be a fixed error in the Cheby- ful Remez exchange algorithm [9]. It is easy to see that we
shev approximation which cannot be reduced. This is the case only need a general algorithm which will do cosine approxi-
when one tries to approximate a full-band differentiator with mations since the other three casescan be reduced to this case.
an even length filter becauseD(t) = 3, while G(i) = 0. Hence, the structure of a general design program will consist
The unity of our approach results from (11) because we can of an input section, formulation of the appropriate equivalent
state one alternation theorem to cover all four cases. approximation problem, solution of the approximation problem
using the Remez algorithm, and calculation of the impulse
A. Alternation Theorem response according to (l)-(7). Fig. 2 shows this structure in
If P(F) is a linear combination of r cosine functions (i.e., block-diagram form.

Authorized licensed use limited to: Imperial College London. Downloaded on September 03,2022 at 21:59:43 UTC from IEEE Xplore. Restrictions apply.
McCLELLANAND PARKS:DESIGN OFDIGITAL FILTERS 701

I I I I 1 J
0 .l .2 .3 .4 .5

Frequency

Fig. 4. Length 128 bandpass filter with a special weighting function.


Stopband attenuation = 66 dB at the stopband edgesincreasing linearly
to 46 dB; passband from 0.12 to 0.13; stopband edgesat F = 0.1 and
F = 0.15.

VI. SUMMARY

El Error : .0000283 An approach to the approximation of FIR linear-phase filters


; has been presented wherein the optimality conditions and the
0
calculation of the best approximation are unified. Thus the
0 .l .2 .3 .4 .5
four types of linear-phase filters can be dealt with by the same
Frequency
approach. This technique should provide a designer with an
Fig. 3. (a) Length 31 wide-band differentiator. Slope error = 0.746. efficient tool for designing this class of filters. A Fortran pro-
(b) Length 31 differentiator. Passbandfrom F = 0 to F = 0.4; slope
error = 0.0000283. gram based on this technique is available from the authors.

ACKNOWLEDGMENT
V. EXAMPLES
The authors would like to acknowledge discussions with 0.
In order to display the flexibility of the present method and
Herrmann and L. R. Rabiner which stimulated this work.
to point out some practical design considerations, the example
filters of Figs. 3 and 4 have been designed. REFERENCES
Fig. 3(a) shows an attempt to design a length 31 wide-band [l] B. Gold and K. L. Jordan, Jr., “A direct search procedure for
differentiator. Since the desired response is 3 at F = 3 and designing finite duration impulse response filters,” IEEE Truns.
Audio Electroacoust., vol. AU-17, pp. 33-36, Mar. 1969.
G(F) is constrained to be zero at F = 3, the resulting [2] L. R. Rabiner, B. Gold, and C. McGonegal, “An approach to the
Chebyshev error is very large. However, if the designer relaxes approximation problem for nonrecursive digital fdters,” IEEE
Trans. Audio Electroacoust. (Special Issue on Digital Filtering),
the specifications such that the desired filter is a differentiator vol. AU-18, pp. 83-106, June 1970.
on the interval [O. 0.41, then Fig. 3(b) shows that a reasonable [3] L. R. Rabiner and K. Steiglitz, “The design of wide-band recursive
and nonrecursive digital differentiators,” IEEE Trans. Audio
filter can be obtained. Electroacoust. (Special Issue on Digital Filteripg), vol. AU-1 8,
Finally, Fig. 4 shows a length 128 bandpass filter for which a pp. 204-209, June 1970.
[4] 0. Herrmann, “Design of nonrecursive digital falters with linear
special weight function was used. This weight was phase,” Electron. L&t., pp. 328-329, 1970.
[5] E. Hofstetter, A. V. Oppenheim, and J. Siegel, “A new technique
for the design of non-recursive digital fdters,” in F’roc. 5th Annu.
OGFG0.1 Princeton Confi Information Sciences and Systems, Mar. 1971,
pp. 64-72.
[6] T. W. Parks, L. R. Rabiner, and J. H. McClellan, “On the transi-
I 12 0.12GFG0.13 tion width of finite impulse-response digital filters,” IEEE Trans.
Audio Electroacoust., vol. AU-21, pp. l-4, Feb. 1973.
[7] T. W. Parks and J. H. McClellan, “Chebyshev approximation for
0.15<F<0.25 nonrecursive digital filters with linear phase,” IEEE Trans. Circuit
Theory, vol. CT-19, pp. 189-194, Mar. 1972.
[8] L. R. Rabiner, “The design of finite impulse response digital
10, 0.25 <F< 0.5 filters using linear programming techniques,” Bell Syst. Tech. J.,
vol. 51, pp. 1177-1198, July-Aug. 1972.
which gives a tolerance scheme which is linear in the intervals [9] L. R. Rabiner and 0. Herrmann, “On the design of optimum FIR
low-pass filters with even impulse response duration,” IEEE
[0, 0.11 and [O.lS, 0.251. At the edge of the stopbands the Trans. Audio Electroacoust., vol. AU-21, pp. 329-336, Aug. 1973.
weight is 100, which makes the actual error small at this point. [lo] 0. Herrmann, “Transversal filters for the Hilbert transformation,”
AEU, vol. 23, pp. 581-587.
The error at the stopband edges is 0.0005 and the maximum [ll] E. W. Cheney, Introduction to Approximation Theory. New
error increases linearly to 0.005. This particular filter was York: McGraw-Hill, 1966, pp. 72-100.
designed in 36 s on an IBM 370/155 using a Fortran IV [12] E. Ya. Remez, “General computational methods of Tchebycheff
approximation,” Kiev, U.S.S.R., Atomic Energy Transl. 4491,
program. pp. l-85,1957.

Authorized licensed use limited to: Imperial College London. Downloaded on September 03,2022 at 21:59:43 UTC from IEEE Xplore. Restrictions apply.

You might also like