Constrained Least Square Design Filters Without Specified Transition Bands

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

IEEE TRANSACTIONS ON SIGNAL PROCESSING, VOL. 44, NO.

8, AUGUST 1996 1879

Constrained Least Square Design of FIR


Filters without Specified Transition Bands
Ivan W. Selesnick, Member, IEEE, Markus L a g , and C . Sidney Bums, Fellow, IEEE

Abstruct- This paper puts forth the notion that explicitly case, and other cases in which the signals to be filtered have
specified transition bands have been introduced in the filter no energy in a transition band, the use of transition bands in
design literature in part as an indirect approach for dealing with filter design is well motivated-the transition band constitutes
discontinuitiesin the desired frequency response. We suggest that
a noncritical part of the frequency response. However, even
the use of explicitly specified transition bands is sometimes inap-
propriate because to satisfy a meaningful optimality criterion, in these cases, there is, in the “guard bands,” usually some
their use implicitly assumes a possibly unrealistic assumption on noise or other undesirable signals that one wants to remove.
the class of input signals. It is for this reason that transition region anomalies in the
This paper also presents an algorithm for the design of peak frequency response are undesirable. Indeed, when large peaks
constrained lowpass FIR filters according to an integral square
error criterion that does not require the use of specifiedtransition occur in the ‘don’t care’ transition band of certain multiband
bands. This rapidly converging, robust, simple multiple exchange Chebyshev filter designs [24], engineers decide they do care
algorithm uses Lagrange multipliers and the Kuhn-Tucker con- and alter the specifications or employ modified algorithms
ditions on each iteration. The algorithm will design linear- and [32], [33] to eliminate the peaks. In many cases, a transition
minimum-phase FIR filters and gives the best Lz filter and a band is introduced to reduce or remove the oscillations in the
continuum of Chebyshev filters as special cases.
It is distinct from many other filter design methods because it frequency response near the band edges caused by the Gibbs’
does not exclude from the integral square error a region around phenomenon and not because transition bands naturally arise
the cut-off frequency, and yet, it overcomes Gibbs’ phenomenon from the physics of the problem.
without resorting to windowing or ‘smoothing out’ the disconti- For the meaningful design of filters, it is necessary to choose
nuity of the ideal lowpass filter. an error criterion that does not implicitly require unrealistic
assumptions on the signals, such as the existence of a band
I. INTRODUCTION
separating desired signals and noise. Although these statements
E CONSIDER the definition of optimality for digi- are informal, below, we draw on the results of Weisburn et al.
tal filter design and suggest that a constrained least [38] to give a mathematical justification for the inclusion of
squared error criterion with no specified transition band is a the transition region in the measure of approximation error.
useful complement to existing approximation criteria for filter This paper (an earlier version of which is [28]) is orga-
design. nized as follows: In Section 11, we establish notation and
Consider, for example, a basic lowpass filtering scenario discuss ways in which Gibbs’ phenomenon has previously
in which a signal of interest whose spectrum occupies the been treated. We also discuss the constrained L2 approach
frequency range ( 0 , ~ is~ )embedded in an additive noise of Adams El], [2] to filter design and the results of Weisbum
signal whose spectrum occupies the entire frequency range et al. [38]. In Section 111, we take into account the results
(0, T ) . In this case, without further assumptions, no transition of Weisburn et al. to modify the approach of Adams. The
band naturally ames from the problem of removing the noise resulting design method adopts the view of Adams and is, at
from the signal of interest: No part of the passband is more or the same time, motivated by the results of Weisburn et al.
less critical than any other part of the passband. Similarly, no The rapidly converging, robust, multiple exchange algorithm
part of the stopband is more or less critical than any other algorithm presented in Section IV produces peak constrained
part of the stopband. In many practical cases, there is no least square lowpass FIR filters. The result is a versatile
separation of the passband and stopband by a transition (or design algorithm that will design linear and minimum phase
‘don’t care’) band between them. Indeed, spectra of the desired FIR filters and that gives the best L2 filter and a continuum
and undesired signals often overlap. of Chebyshev filters as special cases. Section V gives some
An important exception to this is the design of filters used interpretations and extensions of this method. A simple Matlab
to select one out of two or more signals that have been program that illustrates the algorithm for odd length lowpass
designed lo occupy well-separated frequency bands. In this filter design is given in the Appendix.
Manuscnpt received June 13, 1994; revised January 15, 1996 This work
supported by DARPA under an NDSEG fellowship, by the Alexander von 11. PRELIMINARIES
Humboldt Foundation, by NSF under Grant MIP-9316588, and by BNR The The frequency response H ( w ) of an FIR filter is given by the
associate editor coordinating the review of this paper and approving it for
publication was Dr Kamal Premaratne. discrete-time Fourier transform of its impulse response h(n):
I W Selesnick and C S Burrus are with the Department of Electncal and N-l
Computer Engineenng, Rice University, Houston, TX 77251-1892 USA
M Lang is with MeVis, D-28359 Bremen, Germany ~ ( w=) h(n)e-Jwn. (1)
Publisher Item Identifier S 1053-587X(96)05281-6 n=O

1053-587W96$05.00 0 1996 IEEE

Authorized licensed use limited to: Qilu University of Technology. Downloaded on April 15,2023 at 10:29:59 UTC from IEEE Xplore. Restrictions apply.
1880 IEEE TRANSACTIONS ON SIGNAL PROCESSING, VOL. 44, NO 8, AUGUST 1996

-
Input: N , wo, SP,6,

InitiaLize constraint set to 0

Calculate p (eq 32)

Remove constraint

Cdculate a (eq 33) 0 0.2 0.4 0.6 0.8 1


w/n
I
Update constraint set
Fig. 2. Desired amplitude of an ideal lowpass filter

i) The weighted integral square error (or ‘‘Lz error”) is


1 given by
Convergence ?

I
I
End
I
ii) The weighted Chebyshev error is given by
Fig. 1. Flowchart for the exchange algorithm for the constrained least square
design of lowpass filters.

In both cases, W ( w )is a nonnegative error weighting function.


If h(n) = k ( N - 1 - n ) , then H ( w ) has linear phase and can When W ( w ) is set to unity over [O,.ir], the approximation
be written as measures above are called the unweighted (or uniformly
weighted) integral square error and the unweighted (or uni-
~ ( w=) A(w)e-J’” (2) formly weighted) Chebyshev error. The simplest method to
design optimal FIR filters minimizes [ [ A ( w-) D ( w ) I / z ,and
where A ( w ) is the real-valued amplitude, and M = ( N - 1)/2 the resulting filter we call the best L2 filter. As is well known,
for length-N filters [22].For simplicity, symmetric odd length if the error weighting function is set to unity over [0,T ] ,then
filters will be discussed in this paper, in which case, A(w) can the best Lz filter is obtained by truncating the Fourier series
be written as of D ( w ) (the rectangular window method). Hence, for simple
M
D(w), a closed-form expression for the filter is easily found.
1 However, W ( w ) = 1 is not generally used in practice because
A ( w ) = -u(O) +
u ( n ) cosnw (3)
a n=l
best L2 filters with this error weighting possess large peak
errors near the band edges. Moreover, the peak value of these
where the impulse response coefficients h(n)are related to the ‘overshoots’ does not diminish with increasing filter length.
the cosine coefficients a(?%)by To overcome this behavior, known as the Gibbs’ phenomenon,
1 three main approaches have been employed:
-u(M - n) for 0 5 n 5 111 - 1 i) the use of nonrectangular windows
2
1 ii) the use of transition functions to continuously connect
za(O) for n = M
adjacent bands

1;
- a ( n - M ) for M + 1 5 n 5 N - 1
otherwise.
Let D ( w ) denote the desired amplitude. For example, see
iii) the use of zero-weighted transition bands placed be-

The
tween adjacent bands.
use of these approaches has spawned a variety of
Fig. 2, in which the desired amplitude of an ideal lowpass filter filter design procedures having the following two desirable
is shown. Approximating this discontinuous function by the properties:
cosine polynomial A(w) given in ( 3 ) is the most basic filter 1) The procedure produces filters that do not suffer from
design problem. Many of the various methods in the filter Gibbs’ phenomenon.
design literature can be distinguished by the ways in which 2) The procedure can be implemented using a computation-
they treat this discontinuity. Indeed, controlling the behavior ally efficient numerical algorithm.
of A ( w ) in the region around the discontinuity has strongly For example, variable-order spline transition functions can be
influenced the development of filter design methods. used with the integral square error approximation measure to
Two primary measures o f approximation error are used in obtain expressions for filters having good response behavior
filter design. Let E ( w ) = D(w) - A ( w ) . around the discontinuity [SI. Alternatively, when a zero-

Authorized licensed use limited to: Qilu University of Technology. Downloaded on April 15,2023 at 10:29:59 UTC from IEEE Xplore. Restrictions apply.
SELESNICK et al.: CONSTRAINED LEAST SQUARE DESIGN OF FIR FILTERS 1881

weighted transition band is used, the best weighted LZ filter slight increase in the Chebyshev error. In Adams’ terminology,
can be found by solving a system of linear equations [37]. In both equiripple filters and best La filters are ineficient.
this case, Gibbs’ phenomenon is also eliminated: The peak Consider lowpass filter design. To obtain filters having a
error diminishes as the filter length increases. The use of better trade-off between these two criteria, Adams uses zero-
zero-weighted transition bands also permits the meaningful weighted transition bands and proposes that 11 A(w ) --D(w ) 11
use of the Chebyshev norm: an error measure for which be minimized subject to a constraint on the Chebyshev error.
the Parks-McClellan (PM) program produces optimal linear This is formulated as a quadratic program [l] as follows:
phase filters. In fact, in order to design lowpass filters by
minimizing the Chebyshev norm, either a transition function (7)
or a zero-weighted transition band must be specified: For
the discontinuous lowpass response given in Fig. 2, the filter such that
minimizing the unweighted Chebyshev error has a Chebyshev
L ( w ) 5 A ( w ) 5 U ( w ) for all w E [O, up]U [w,, .-I. (8)
error of one half and is not unique.
Unfortunately, each of the three enumerated methods has In (7), Adams weights the integral square error by the weight
its shortcoming. function
Windows: Although the multiplication of the Fourier W, for all w E [0,U,]
coefficients of D ( w ) with a nonrectangular window is 0 for all w E [ w , , ~ , ] (9)
very simple, the method is generally considered sub- W, for all w E [w,,n].
optimal because it is difficult to use it to minimize
meaningful error measures (but see [12]) and because In (8), the upper and lower bound functions L(w) and U ( w )
error weighting in the sense of (5) is not achieved. are given by
Transition Functions: Although modifying the desired 1 - 6, for all w E [O, wpJ
amplitude D ( w ) (so that it is no longer discontinuous)
yields approximations that do not suffer from Gibbs’
L(w) =
-6, {
for all w E [w,, r] (10)

phenomenon, the method does not directly approximate and by


the original discontinuous desired lowpass amplitude
+
1 6, for all w E [O, w,]
function.
Zero-Weighted Transition Bands: By a zero-weighted
U(W) =
6, {
for all w E [ w s , r ] (11)

transition band, we mean a region placed between two where 6, and 6, are the maximum allowed deviations from 1
adjacent bands where W ( w )is taken to be 0. Because and 0 in the passband and stopband.
A(w)- D(w) is not weighted there, zero-weighted tran- This constrained L2 approach allows the user to control the
sition bands are sometimes called ‘don’t care’ regions. tradeoff between the L2 and Chebyshev errors and produces
The use of zero-weighted transition bands make the best L2 and Chebyshev filters as special cases. Of course, for a
approximation problem easier. However, if they are fixed filter length and a fixed 6, and 6, (each less than 0.5), it
used, then unless the input signals have no energy in the is not possible to obtain an arbitrarily narrow transition band.
transition band, the optimality of the best Chebyshev and Therefore, if the band edges wg and w, are taken to be too
L2 filters in the operator norm sense [38] is problematic. close together, then the quadratic program (7) and (8) has no
Therefore, although the use of these approaches makes solution. Similarly, for a fixed upand us, if 6, and 6, are taken
easier the approximation of the discontinuous desired ampli- too small, then there is again no solution. In the terminology
tude, they are all rather indirect methods for dealing with the of quadratic programming [lo], the feasible region is empty.
discontinuity. Although the algorithm in [ 13 tests for optimality upon ter-
mination by checking the nonnegativity of Lagrange mdtipli-
ers, during the iterations, it does not enforce this nonnegativity.
A. Adams ’ Error Criterion For this reason, it may converge to a nonoptimal filter. In [17]
An early comparison of error criteria was made by Tufts and and [18], an algorithm for the design of nonlinear phase FIR
Francis [361. More recently Adams [l], [2] described perhaps filters according to the same error measure is proposed. It
the most meaningful error criterion for filter design to date and inspects the signs of Lagrange multipliers on each iteration
suggested an iterative algorithm to design the corresponding so that if the algorithm converges, then the filter to which it
best linear-phase filters. converges is guaranteed to be optimal. However, the algorithm
As Adams has noted, L2 filter design is based on the in [18] is also not guaranteed to converge, but it was found
assumption that the size of the peak errors can be ignored. that for lowpass filter design, whenever there exists a filter
Likewise, filter design according to the Chebyshev norm as- satisfying the constraints specified by the user, the algorithm
sumes that the L2 measure of approximation error is irrelevant. converges in practice. To develop exchange algorithms for
In practice, however, both of these criteria are important: a solving (7) and (8) that are guaranteed to converge to optimal
point Adams elaborates upon in [l]. Furthermore, Adams finds filters, it is necessary to modify the algorithms of [l], [17],
that the peak error of a best LZ filter can be significantly and [18]. In [2], Adams et aZ. describe in detail appropriate
reduced with only a slight increase in the Lz error. Similarly, modifications based on [ 111 that guarantee convergence and
the L2 error of an equiripple filter can be reduced with only a optimality. In [35], Sullivan and Adams extend the algorithm

Authorized licensed use limited to: Qilu University of Technology. Downloaded on April 15,2023 at 10:29:59 UTC from IEEE Xplore. Restrictions apply.
1882 IEEE TRANSACTIONS ON SIGNAL PROCESSING, VOL 44, NO. 8, AUGUST 1996

of [2] to the design of nonlinear phase FIR filters with


constraints on the group delay.

B. Approximation by Operator Norms


Weisbum et al. [38] present a rigorous motivation for the
use of the Chebyshev and La error measures and discuss
the use of zero-weighted transition bands (see also [30] and
[31]). Using the theory of operator norms, they show that best
Chebyshev filters minimize a worst-case error signal energy,
whereas best Lz filters minimize a worst-case pointwise error
in the time domain. However, to show this optimality in the
operator norm sense when a zero-weighted transition band is I J
used, a hypothetical ideal prefilter is placed at the input, the 0 0.2 0.4 0.6 0.8 1
WIIF
frequency response of which is zero on the don’t care region
and 1 everywhere else [38]. Fig. 3. Best unconstrained LZ filter (N = 61,w, = O . ~ P ) , given by the
Weisbum eb al. begin by defining E ( w ) = A ( w ) - D(w) =
sinc function. [131[$0.003375, peak error = 0.09369.
as the frequency response of an error filter E . They view
the error filter as an operator and use an operator norm as the specified transition bands, then the way in which the filters
a measure of approximation. The filter design problem then are optimal is unclear in general.
becomes one of finding A to minimize JIA - D ( ( ,where the Suppose, on the other hand, that a transition function is used
norm is an operator norm. To define the norm of an operator, to modify D ( w ) so that it has a smooth transition between
it is necessary to define a norm on the class of input signals, the passband and stopband. Then, the best filters obtained
which we will denote 11 11%) and a norm on the class of output according to any approximation measure do not correspond to
signals 11 ,. Note that the norms used for the input and output the original desired discontinuous frequency response D(w) .
signals do not have to be the same. The operator norm of E
is then defined as 111. A NEW CRITERION FOR LOWPASS
FILTERDESIGN
In light of the preceding discussion, we suggest that the
use of explicitly specified transition bands in FIR filter design
began in part with the desire to reduce peak errors near the
where x represents the input signal of the error filter E , band edges and that these ‘don’t care’ regions are, in some
and y = Ex represents the corresponding output signal. The cases, used because they facilitate the approximation problem
supremum is over the space of input signals U. This ratio and not because they naturally arise from the filter problem
indicates the amount by which the filter E “magnifies” or under consideration.
“attenuates” the input signal with respect to the chosen input Furthermore, because the minimization of the Chebyshev
and output norms. norm for lowpass filter design requires the use of a transition
It turns out that when the class of input signals is talcen band, we propose for some problems that the Lz norm be
to be the space of all finite energy sequences and when the the primary optimization measure and that the peak errors be
input and output signal norms are both taken to be the Z2 norm controlled by a constraint.l In the next section, we present
d
( 1 1 ~ 1 1 =~ m and (1 (1% = (1 . Il , ) , then the operator an algorithm for the design of peak constrained lowpass FIR
norm is equal to the unweighted Chebyshev norm llE(w)~~oo filters according to an integral square error criterion that does
defined in (6). Therefore, the best Chebyshev filter minimizes a not require the use of specified transition bands.
worst-case output signal energy over a set of bounded energy Let us define E(w) = A ( w ) - D ( w ) , where D ( w ) is the
input signals [38]. ideal discontinuous lowpass amplitude. It will be convenient
On the other hand, if the input signal space and norm is kept to make the meaning of the term ‘peak errors’ more precise.
the same but the output signal norm is taken to be IlyIl. = By peak errors of a lowpass filter, we mean the values of
Iy(n) I for some fixed index n, then the operator norm is equal IE(w)I at the ZocaZ minima and maxima of A ( w ) . With this
to the unweighted integral square error l l E ( w ) ] ] 2defined in definition, the peak errors do not include values of E(w) at
( 5 ) . Note that it is independent of the index n. Consequently, the edges of a transition band (see Fig. 4).
the best L2 filter minimizes a worst-case pointwise error in the Let w, be the cut-off frequency (the frequency at which the
time domain over a set of bounded energy input signals [38]. ideal lowpass amplitude is discontinuous). The design problem
Suppose that D ( w ) is the usual discontinuous ideal low- we propose uses the Lz weight function and lower and upper
pass frequency response. Further, suppose an error weighting bound functions given by the following:
function is used that is zero in a specified transition band. If 1) W ( w ) = 1 for all w E [O,7r].
the signals in the input class have no energy in the transition 2) U ( w ) = 1+ S,,L(w) = 1 - S, for all w E [O,w,].
band, then the filters obtained by minimizing the weighted ‘There are cases where the Chebyshev error should be truly mmimlzed (e.g.,
Chebyshev and L2 norms are optimal in the operator norm narrowband interference at an unknown frequency), but simply reducmg it or
sense [38]. However, if the input signals do have energy in constrining it is generally sufficient.

Authorized licensed use limited to: Qilu University of Technology. Downloaded on April 15,2023 at 10:29:59 UTC from IEEE Xplore. Restrictions apply.
SELESNICK et a1 : CONSTRAINED LEAST SQUARE DESIGN OF FIR FILTERS 1883

rI I
I
minimizing an unweighted unconstrained L2 is more suitable.
When it is known that input signals do not have energy in
a transition band (or very little), then the use of a specified
transition band is well motivated. In this case, the transition
band constitutes a noncritical part of the response. Examples
of this are when well-separated signals are to be filtered. For
such applications, the PM algorithm, the algorithm of Adams,
0 1 . or the linear programming algorithms of [33] are better suited.
a wlx
The approach we propose in this paper and the algorithm
we describe are intended to complement the existing methods
by providing an approach with few assumptions for a basic
lowpass filtering problem.
I I
0 0.2 0.4 0.6 0.8 1
d
7c FOR LOWPASS
IV. A NEW ALGORITHM FILTERDESIGN
Fig. 4. Best constrained L2 filter ( N = 61,w, = 0.37) with The algorithm described below produces lowpass linear
Sp = 6, = 0.02. 11311; = 0.003858. The ‘induced’ band edges are
wip = 0.2728r and w t S = 0 . 3 2 7 0 ~ .
phase FIR filters according to the new criterion descnbed in
the previous section. It is a rapidly converging, robust, simple
multiple exchange algorithm that uses Lagrange multipliers
3 ) U ( w ) = 6,,L(w) = -&, for all w E ( w o , n ] . and the Kuhn-Tucker conditions on each iteration [lo], [34].
We propose the following problem formulation. Although we have not proven its convergence, the algorithm
New Criterion: Minimize the unweighted integral square converges in practice when used for lowpass filter design. A
error (5) subject to the constraint that the local minima and Matlab program that implements this algorithm is especially
maxima of A(w) lie within the specified lower and upper simple and is given in the appendix. For multiband filter
bound functions L(w) and U ( w ) . design, the algorithm must be modified to obtain robust
The algorithm described below produces lowpass linear- convergence [29].
phase filters according to this criterion. They have frequency The algorithm will design linear- and minimum-phase low-
response amplitudes that are very similar in appearance to pass FIR filters and gives the best LZ filter and a continuum
those obtained using the approach described by Adams. How- of Chebyshev filters as special cases. The algorithm can be
ever, there are three main differences: modified to allow different L2 error weighting in different
1) There is no region around the discontinuity that is bands and to allow other types of constraints. We have
excluded from the integral square error approximation designed lowpass filters of lengths over 3000 and have used
measure. The algorithm minimizes the square error over loose and tight constraints that differed in the passband and
the entire frequency range from 0 to n subject to the stopband by factors as much as lo6.
peak constraints.
2) The transition region is implicitly defined by the con- A. The Equality-Constrained Minimization Problem
strained LZ minimization procedure. It is not dictated The amplitude A ( w ) of the filter minimizing the L2 error
by the specification of transition band edges. Indeed, subject to peak constraints will touch the lower and upper
band edges are not specified. bound functions at certain extremal frequencies of A ( w ) . (By
3) There is no minimum achievable peak error size. That extremal frequencies of A ( w ) , we mean local minima and
is, filters having arbitrarily small peak errors can be maxima of A ( w ) ) .If these frequencies were known in advance,
obtained. The problem of infeasibility encountered in then the filter could be found by minimizing 1 1
311$subject
the quadratic program formulation does not arise. to equality constraints at these frequencies. The procedure
Because the approach taken here weights the LZ error over below determines the appropriate set of frequencies by solving
the entire interval [O,.rr], there are no natural band edges to a sequence of equality constrained quadratic minimization
use in (8) of the quadratic program formulation. For this problems. The solution to each minimization problem is found
reason, the approach to filter design described here can not by solving a linear system of equations.
be described by a quadratic program. It should be noted that This iterative algorithm is based on those of [1] and [18].
the new criterion also applies to multiband filter design, but The constraints are on the values of A(w,) for the frequency
for clarity, only the lowpass case is examined in this paper. points w, in a constraint set. On each iteration, the constraint
The extension to arbitrary responses is not developed here, but set is updated so that at convergence, the only frequency
it is expected that some extensions to nonpiece-wise constant points at which equality constraints are imposed are those
responses are possible. where A ( u ) touches the constraint. The equality-constrained
The use of this criterion for lowpass filter design is suitable problem is solved with Lagrange multipliers. The algorithm
for situations where the maximum peak error size is to be below associates an inequality-constrained problem with each
controlled and where there is no reason to assume that the input equality-constrained one. According to the Kuhn-Tucker con-
signals to be filtered have no energy in a transition band. If the ditions, the solution to the equality-constrained problem solves
peak errors are unimportant, then the sinc function obtained by the corresponding inequality-constrained problem if all the

Authorized licensed use limited to: Qilu University of Technology. Downloaded on April 15,2023 at 10:29:59 UTC from IEEE Xplore. Restrictions apply.
1884 E E E TRANSACTIONS ON SIGNAL PROCESSING, VOL. 44,NO. 8, AUGUST 1996

Lagrange multipliers are nonnegative (where the signs of the Recalling (3) and letting W ( w ) = 1, (16)-(18) can be
multipliers are defined appropriately). If on some iteration written as
a multiplier is negative, then the solution to the equality-
constrained problem does not solve the corresponding inequal- a+Gtp=c (21)
ity constrained one. For this reason, before the constraint
set is updated in the algorithm described below, constraints
corresponding to negative multipliers (when they appear) are Ga=d (22)
sequentially dropped from the constraint set. In this way, an
inequality-constrained problem is solved on each iteration, where a is the length M +1 vector of unknown filter
albeit over a possibly smaller constraint set. It tums out that in parameters a = ( a ~. .;. , a ~ )and ~ p, is the vector of Lagrange
the special case of lowpass filter design considered here, this multipliers, one for each frequency in the constraint set:
simple iterative technique converges in practice. p = ( p ~ , . . * , p , )G
~ .is the T by M + 1 matrix of cosine
Let the constraint set S be a set of frequencies S = terms that calculates the amplitude response A(w) of the filter
{ w l , . ,w,} with wz E [0,7r]. Let S be partitioned into two a at the frequencies in the constraint set S . The elements of
sets, Sl and S,, where Sl is the set of frequencies where we G are given by
wish to impose the equality constraint -1
G,,o = JZ
A(w) = L(u), (13) Gz,$= - cos kw,
whereas S, is the set of frequencies where we wish to impose for 1 <_ i 5 q , l 5 k 5 M and
the equality constraint
A(w) = V ( W ) .
Ga,k = C O S ~ W , (26)
Let us have SI= { w l , . . . , w q } and S, = { w g + l , . . . ,w,}. TO
minimize 11E(w)112 subject to these constraints, we form the for q + I 5 i <_ T , 1 5 k 5 M . e is the vector of coefficients
Lagrangian [lo], [20], [341 for the unconstrained optimal Lz filter given by

cg =-
?.6" D ( w ) dw

z=q+l
Notice that the elements of c do not depend on the constraints
Necessary conditions for 11E(w)112 to be mini@zed subject to imposed on A ( w ) . In fact, they are the Fourier coefficients.
the constraints above are obtained by setting the derivative of Indeed, if there are no constraints imposed on A ( w ) , then a (
.
)
C with respect to a$ and pa to zero. This yields the following equals c ( n ) , which is the best L2 filter. The term d is the vector
equations: of values the amplitude response A(w) is made to interpolate

for 0 5 k 5 Ad,

for 1 5 a 5 q, and
+
for q 1 5 i 5 r . It is necessary to introduce minus signs
for the lower bound constraints so that at the solution to
the inequality-constrained minimization problem, all of the
Lagrange multipliers will have the same sign. Equations (21)
+
for q 1 <_ i 5 r. According to the Kuhn-Tucker conditions, and (22) can be combined into one matrix equation:
when the Lagrange multipliers p1; . . . , 1,are all nonnegative,
then the solution to (16)-( 18) minimizes 11 E (U )11 2 subject to
the inequality constraints
In (31), I M +is~ the ( M + 1) by ( M + 1) identity matrix.
Similar expressions can be derived for the even-length filter
and the odd symmetric filters [22].
It i s easy to verify that

Authorized licensed use limited to: Qilu University of Technology. Downloaded on April 15,2023 at 10:29:59 UTC from IEEE Xplore. Restrictions apply.
SELESNICK et al.: CONSTRAINED LEAST SQUARE DESIGN OF FIR FILTERS
1885

is the solution to (31). Therefore, if the number of constraints and stopband is the inclusion of the transition region in the
( r ) is small compared with the number of filter coefficients integral square error.
+
( M l), then the system (31) is computationally very inex- The algorithm can be summarized in the following steps:
pensive to solve. It requires the solution to an T x r system Initialization: Initialize the constraint set to the empty
of linear equations. This is attributed to the use of W ( w ) = 1 set: S = 0.
over [0, TI. It is interesting to note that on each iteration, the Minimization with Equality Constraints: Calculate
cosine coefficients a are obtained by adding a correction term the Lagrange multipliers associated with the filter that
to the best LZ (Fourier) coefficients c. This is in contrast to minimizes llE(w)112 subject to the equality constraints
the window method, in which the best L2 coefficients are
A ( w , ) = L(w,) for w, E Sl,and A(w,) = U(w,) for
multiplied by a window.
w, E S,. (Solve equation (32)).
For nonuniform weighting functions, the identity matrix in
Kuhn-Tucker Conditions: If there is a constraint set
(31) becomes a full symmetric matrix [7], [8] and (16)-(18)
frequency w, for which the Lagrange multiplier p%
become
is negative, then remove from the constraint set the

[E I;[]? = [f;] (34)


frequency corresponding to the most negative multiplier,
and go back to step 2. Otherwise, calculate the new
cosine coefficients using (33), and go on to step 4.
where the elements of the vector c are given by
Multiple Exchange of Constraint Set: Set the con-

CO f1"W ( w ) D ( w )dw
=- (35)
straint set S equal to SZU s,,
where SZis the set of
frequency points w, in [O,T] satisfying both A'(w,) =
0 and A ( w , ) I L ( w , ) , and where S, is the set of
frequency points wz in [0, E ] satisfying both A'(w,) = 0
and A(w,) 1 U(w,).
and the elements of the matrix R are given by Check for Convergence: If A ( w ) 2 L ( w ) - E for all
frequency points in SZ and if A ( w ) 5 U ( w ) E for +
(37) all frequency points in S,, then convergence has been
achieved. Otherwise, go back to step 2.
Ro,k = Ra,o = $1" W ( w )cos kw dw (38) According to the Kuhn-Tucker conditions, because p 2 0 is

R ~ ,=ER1,k = 51% W ( w )cos kw cos lw dw (39)


ensured for each set of computed cosine coefficients a, then
each filter minimizes the La error subject to the inequality
constraints (19) and (20) over a set of frequencies. At conver-
and where G and d are the same as above. It is easy to verify gence, the constraint set frequencies are exactly those extrema
that of A ( w ) , where A ( w ) touches the lower and upper bound
function. It should be noted that negative multipliers generally
- -d%
p =(GR-~G~)-~(GR ) (40) appear only during the early iterations of the algorithm. E in
step 4 is a small number (like indicating the numerical
a =R-'(c - G'p) (41)
accuracy desired. In Appendix A, some issues concerning the
is the solution to (34). convergence of the algorithm and the optimality of the filters
it produces are discussed.
B. The Exchange Iterations A flowchart is shown in Fig. 1. The Matlab program below
The equality-constrained optimization procedure described implements this algorithm with W ( w ) = 1. For the sake
above is performed at each step of an iterative algorithm. At of space and clarity, it uses a grid of frequency values.
each iteration, the constraint set frequencies are updated in However, it is more preferable to refine the location of the
much the same way as are the reference set frequencies of the extremal frequencies by Newton's method; otherwise, a rather
Remez algorithm. dense grid is sometimes required for convergence. The use of
The algorithm begins with an empty constraint set so that Newton's method is easily incorporated.
the first filter designed is the best unconstrained LZ filter. The computational complexity is O(M 3 ) per iteration;
Then, constraints are iteratively imposed on A ( w ) at selected however, the computation required for each iteration depends
frequencies until the best constrained Lz filter is obtained. The on the size of the constraint set for that iteration. Some of
constraint set is updated first by locating the local maxima the efficient computational techniques that have been used to
of A ( w ) that exceed the upper constraint function U ( w ) and improve the implementation of the PM program can also be
second by locating the local minima of A ( w ) that fall below applied to the algorithm described here [3]-[6], [9], [32]. These
the lower constraint function L ( w ) . Note that the "induced" techniques are used to
band edges of the passband and stopband are not extremal 1) increase the speed of execution
frequencies of A ( w ) . Unlike the program of Adams and the 2) reduce memory requirements
PM program, the band edges are not included in the constraint 3) improve numerical accuracy of the result.
set (or in the case of the PM program, the reference set). The Example I : We let D ( w ) be the usual ideal lowpass filter
mechanism that yields a sharp transition between the passband with a cut-off frequency wo = 0 . 3 ~shown in Fig. 2. We

Authorized licensed use limited to: Qilu University of Technology. Downloaded on April 15,2023 at 10:29:59 UTC from IEEE Xplore. Restrictions apply.
1886 IEEE TRANSACTIONS ON SIGNAL PROCESSING, VOL. 44, NO. 8, AUGUST 1996

use 31 cosine coefficients ( M = 30, and the filter length


+
is 61), U ( w ) = D ( w ) 6, and L(w) = D ( w ) - S with 0.02
S = 0.02. We use the La weighting function W(w) = 1. W O
In four iterations, the above-described algorithm converges -0.02
to the frequency response amplitude shown in Fig. 4. In
the figure, the circular marks indxate the 14 constraint set 0 0.2 0.4 0.6 0.8 1
frequency points upon convergence. Compared with the best ah
unconstrained L2 filter shown in Fig. 3, the constrained filter (a)
in Fig. 4 has a considerably smaller peak error near the band
edge. This is achieved with a small increase in the transition I I '
width and the Lz error. The L2 error and the peak error
associated with the best unconstrained L2 filter are l]Ell$=
0.003 375 and 0.093 69, respectively. For the constrained L2
filter, they are IlEIl~= 0.003 858 and 0.02, respectively. The I I I
resulting "induced" band edges of the constrained Lz filter are 0 0.2 0.4 0.6 0.8 1
wzp = 0.2728~ and w,, = 0 . 3 2 7 0 ~ . @/a
The convergence of the algorithm is illustrated in Fig. 5. (b)
The amplitude A o ( w ) shown in Fig. 5(a) is the best uncon-
strained L2 filter (given by the sinc function). The first set of
constraints formed are taken to be the extrema of A o ( w ) that
violate the upper and lower bound constraints. When (32) is
used with this constraint set to calculate p, it tums out that two
of the Lagrange multipliers are negative. (The two constraints
corresponding to these two negative Lagrange multipliers are 0 0.2 0.4 0.6 0.8 1
@/IC
the local maximum, and the local minimum nearest w = 0.) In
this example, after the constraint set frequency corresponding (c)
to the more negative of these two negative multipliers is
removed from the constraint set and (32) is used again, there is r I ' I
still one negative multiplier. After the corresponding constraint
is removed from the constraint set and (32) is used a third
time to calculate p, it is found that all the multipliers are
positive. Now, (33) is used to compute the filter coefficients a. L I
The new amplitude Al(w) is shown in Fig. 5(b). The circular 0 0.2 0.4 0.6 0.8 1
marks in this figure indicate the constraint set used to obtain ah
Al(w). A l ( w ) interpolates L(w) and U ( w ) at the constraint. (d)
points because (17) and (18) were derived from (16)-(18) and Fig. 5. Illustration of the convergence behavior of the algorithm: (a) Iteration
because (17) and (18) are interpolation equations. As above, 0-Maximum constraint violation = 0.7369. (b) Iteration 1-Maximum con-
straint violation = 0.006481. (c) Iteration 2-Maximum constraint violation
the extrema of A l ( w ) that violate the upper and lower bound = 0.001308. (d) Iteration 3-Maximum constraint violation = 0.000003541.
constraints are used to form a new constraint set. Equation
(32) is used with this constraint set to compute a new set of
interpolate L(w) and U ( w ) at the frequencies in the constraint
multipliers. It is found that all the new multipliers are positive;
therefore, no constraints are removed from this constraint set. set. This is quite similar to the behavior of the Remez
Equation (33) is then used, and the amplitude A 2 ( w ) is shownalgorithm used in the PM program. However, the process of
in Fig. 5(c). A ~ ( wis) obtained similarly also without the the algorithm has three major differences to the PM program:
appearance of negative multipliers. The number of reference set frequencies in the PM
It should be noted that this example and the following program is fixed and does not change throughout the
examples were generated using a version of the program that algorithm, whereas here, the number of constraint set
uses a grid to approximately locate the extrema of A ( w ) and frequencies does change and is generally smaller than
Newton's method to refine these frequencies. the number used in the PM program. In addition, the
alternation of the signs of E(w) that holds for a PM
equiripple filter and is enforced at each step of the
v. INTERPRETATIONS AND EXTENSIONS Remez algorithm does not necessarily hold here.
There are several observations and interpretations of this The size of the Chebyshev error changes (increases)
algorithm that may be helpful in understanding it in relation on each step of the PM program, whereas here, it is
to other approaches and in modifying it for other applications. prescribed. Here, the Lz error generally increases, and
The constraint set at each step in the iteration contains the induced transition band generally widens.
the candidates for the final extrema1 frequencies that touch In the PM program, the number of reference set fre-
the constraint. Satisfying these constraints forces A ( w ) to +
quencies is M 2. This is one greater than the number

Authorized licensed use limited to: Qilu University of Technology. Downloaded on April 15,2023 at 10:29:59 UTC from IEEE Xplore. Restrictions apply.
SELESNICK et al.: CONSTRAINED LEAST SQUARE DESIGN OF FIR FILTERS 1887

of unknown cosine coefficients. In our algorithm, unless


the constraints are tight, the number of frequencies is
less than the number of unknowns, and those degrees of
freedom not used to satisfy interpolation constraints are
used to minimize the integral square error at each step.
Nevertheless, the overall behavior is similar to that of the PM
program. As in the Rem6z algorithm used in the PM program,
on each iteration, 1) an optimization problem is solved over
a finite set of frequencies, and 2) the set of frequencies is
updated. Indeed, the interpolation step of the Remez algorithm
can be interpreted as an optimization problem: The filter
found at each iteration of the Remez algorithm minimizes the
Chebyshev error over the updated reference set [23]. I

Often, it is desirable to include equality constraints on 0 0.2 0.4 0.6 0.8 1


d 7 t
the value and derivatives of A(w) at prescribed frequency
Fig. 6 . Best constrained Lz filter (N = 61,w, = 0 . 3 ~ )with
points. An application is given, for example, in [21], where 6, = 5, = 0.004. 11311; = 0.004780. The “induced” band edges are
flatness at w = 0 is achieved by imposing appropriate equality wtP = 0 . 2 5 7 6 ~and wt5 = 0 . 3 4 2 1 ~ .
constraints. The inclusion of these and other linear equality
constraints on the cosine coefficients in the approach described initialization of reference frequencies such as those given in
in this paper is straightforward. It requires only the use of extra [6], [9], and [32]. This comparison is made to evaluate the
Lagrange multipliers, the signs of which are unimportant. For convergence in the number of iterations and not to compare
example, magnitude squared design of minimum phase filters execution times.
can be accomplished by taking the lower bound function L(w) It is interesting that the filter in Example 2 is both i) a
to be 0 in the stopband and by spectrally factoring the resulting best peak constrained Lz filter and ii) a best Chebyshev filter
nonnegative frequency response amplitude. A polynomial root for an appropriate transition band. There are other algorithms
finding algorithm and the computation of spectral factors is for the design of equiripple filters with specified peak errors
discussed in [19]. [13]-[16], [26], [27], but the peak constrained L2 approach
used here gives a way to design a subset of such filters that
A. Chebyshev Solutions incorporates the Lz error.
Observe that if for a fixed number of filter coefficients, the
constraint on the weighted Chebyshev error llE(w)llooin [l] B. Trade-off Curves
and [18] is chosen too small (or equivalently, 6, and 6, in In [l], Adams provides a curve illustrating the tradeoff
(7) and (8) are chosen too small), then no filter satisfies the between the weighted LZ error and the Chebyshev error for
constraint. In this case the algorithms of [ 11 and [181 can not the filters produced by his approach. It is quite convincing that
converge. Although this problem can be avoided by computing the filters on the endpoints of this curve do not provide the
the minimum value of llE(w)llo0 with the PM program, it is most desirable tradeoff. The same is true here.
interesting to note that there is no minimum 6, and S, below By decreasing the peak error S to 0, a curve illustrating the
which the approach described in this paper fails to converge. tradeoff between the unweighted integral square error and S
If 6, and 15, are taken to be small, then the transition region can be obtained. Fig. 7 shows the curve for length 61 filters
between the passband and stopband simply becomes wider. designed using the approach of this paper, where the cutoff
Therefore, for a fixed w, , by decreasing 6, and 6, ,a continuum frequency is w, = 0.3n, and S = 6, = 6,. S is varied to
of PM equiripple filters are obtained. obtain the curve in the figure. The circle at the right end of
Example 2: We use the same desired lowpass amplitude as the figure indicates the best unconstrained L:! filter. As S is
in example 1 and we keep M = 30, but we use S = 0.004. We decreased from that point, the LZ error increases as illustrated.
use the unity L:! weighting function. The resulting frequency The circular mark at S M 0.0086 indicates the point where S
response shown in Fig. 6 is obtained in six iterations, and the first becomes small enough to produce a PM equiripple filter.
size of the constraint set on convergence is 30. Here, the peak In this example, all points on the curve to the left of this point
error is significantly reduced with a corresponding increase represent PM equiripple filters. Because there is no smallest
in the transition width and L2 error. The L:! error associated value for 6,the curve approaches a point on the S = 0 axis.
with this filter is 1131;= 0.004 780. The resulting “induced”
1 We conjecture that the point on the S = 0 axis, that this curve
band edges of this constrained La filter are w,, = 0.2576~ approaches, represents a maximally flat (digital Butterworth)
and w,, = 0 . 3 4 2 1 ~ . filter [13].
Note that although this filter was not designed using the We should note that even though all points on the curve
PM program, it corresponds to a best Chebyshev filter for for S < 0.0086 in Fig. ‘7 represent equiripple filters, this is not
appropriately chosen band edges because then, the alternation true in general. For example, suppose 6, is decreased toward
theorem will be satisfied. For this example, this algorithm zero, and 6, is kept constant. Then, it is sometimes the case
takes about the same number of iterations as does the PM that the set of S,, for which the points on the curve represent
program when the PM program is executed without a superior equiripple filters, is a union of disjoint intervals.

Authorized licensed use limited to: Qilu University of Technology. Downloaded on April 15,2023 at 10:29:59 UTC from IEEE Xplore. Restrictions apply.
1888 IEEE TRANSACTIONS ON SIGNAL PROCESSING, VOL 44, NO 8, AUGUST 1996

occurs only when the constraints are relatively tight, in which


,
case, the algorithm described here reproduces a modified
PM algorithm [26]. Likewise, the rule for deciding which

C ( N

Fi 4.5
=
“R I\ frequency to remove is similar to the rule used in [26] and is
described below. Note that in this situation, the constraint set
necessarily contains 0 and T.Step 4 of the algorithm described
in Section IV-B becomes the following:
4) Multiple Exchange of Constraint Set: Let S z be the
set of frequency points w, in [O,T] satisfying both
A’(w,) = 0 and A(w,) 6 L ( w , ) . Let S, be the set of
frequency points w, in [O, T ] satisfying both A’(w,) = 0
and A ( w t ) 2 u(wz).
Let w, be the passband extremum of A ( w ) closest
3A 0.02 0.04
6
0.06 0.08 d.1 to w,. If w, < wp < w, and A ( w p ) < L ( w p ) , then let
Sl = S z U w*.
Fig. 7. Trade-off curve for integrd square error and peak size error: 1 1
311
z If w = 0 is a local maximum of A ( w ) , let Eo =
versus 6,. This curve illustrates the tradeoff for filters of length 61 designed A(0) - U ( 0 ) ;otherwise, set Eo = L(0) - A(0).
with w o = 0.3n, and 5 = 5, = 6,.
If w = T is a local maximum of A ( w ) , let E, =
C. Specijied Band Edges A ( T )- U ( T ) ;otherwise, set E, = L ( n ) - A ( T ) .
The approach taken in this paper does not preclude the
+
If 1st) \SUI = M + 2 and Eo < E,, then remove 0
from Sl or S,, whichever contains 0.
specification of a transition band edge in the design of a
lowpass filter. Let wp < w, be a specified passband edge. This
If I + +
S11 IS,\ = M 2 and Eo 2 E,, then remove 7r
from 5’1 or Sa,whichever contains T.
subsection describes how to append the constraht Set the constraint set S equal to SI U S,.
A stopband edge ws can be specified instead of a passband
edge in exactly the same way. If both the passband and the
to the formulation of Section 111. By doing so, the frequency stopband are to be specified simultaneously, then the problem
response amplitude A(w) will be guaranteed to lie between can be posed as a quadratic program as discussed above, and
the lower and upper bound functions L ( w ) and U ( w ) for all w Adams’ approach should be used. When both band edges are
in the passband [O, w p ] .This is because the only way in which specified, it is possible that no solution exists because the
A ( w ) can violate the lower and upper bound constraints in the transition band cannot be arbitrarily sharp. Note that here a
passband is by violating one of them at wp or by violating one distinction is being made betweenl the cut-off frequency w,
of them at a local extremal. Because the algorithm described in and the band edges wp and w, (wp 5 w, 5 w s ) .
Section IV-B ensures that L(w)and U ( w ) are not violated at Example 3: We use the same desired lowpass frequency
the local extremals of A ( w ) , it is sufficient to append the single response as in the previous two examples with 6 = 0.020 and
constraint (42). The appropriate modification to the algorithm A4 = 30, but we require that the passband edge be located
of Section IV-B is described below. at 0 . 2 8 5 ~ .We use the Lz weighting function W(w) = 1.
Appending the constraint (42) to the existing constraints In seven iterations, the algorithm converges to the frequency
requires modifying only the way in which the constraint set is response shown in Fig. 8. The size of the constraint set upon
updated. There are two issues that must be addressed. convergence is 28. The Lz error associated with this filter is
First, notice that the constraint (42) may be satisfied by the \\Ell; = 0.006 893. The resulting “induced” stopband edge o f
filter produced by the basic algorithm of Section IV-B. Then this constrained Lz filter is w,, = 0.3376~.
the constraint is met with no additional effort. This is the case
when the induced passband edge wzp is closer to w, than is
the specified passband edge wp . When this is not the case, it is D. The Use of L2 Weighting
necessary to simply append wp to the constraint set. To detect,
during the iterative algorithm, exactly when it is necessary to Although the algorithm described in Section IV-B was in-
include wp in the constraint set, the following decision rule is troduced with a uniform L2 weighting function, the algorithm
used: Let w, be the passband extremum of A ( w ) closest to w,. can also be used with an L2 weighting function that equals
If w, < wp < w, and A ( w p )< L(w,), then include wp in the zero in a specified transition band, if so desired. As discussed
constraint set; otherwise, leave the constraint set unchanged. above, when it is known that the signals in the input class
The second issue that must be addressed is the occurrence of have no (or little) energy in a transition region, the use of
an overconstrained problem on some iteration. After appending a zero-weighted (or lightly weighted) transition band is well
wp to the constraint set, the number of constraints may motivated. The only modification required is the substitution
outnumber the number of cosine coefficients by one. When of (34) for (31). The method for performing the multiple
this occurs, (21) and (22) are, in general, overdetermined and exchange of the constraint set remains unchanged. In this
cannot be solved. Consequently, a frequency must be removed case, the L2 weighting function possesses band edges, but
from the constraint set before the algorithm can proceed. This the upper and lower bound functions are not enforced at these

Authorized licensed use limited to: Qilu University of Technology. Downloaded on April 15,2023 at 10:29:59 UTC from IEEE Xplore. Restrictions apply.
SELESNICK et al.: CONSTRAINED LEAST SQUARE DESIGN OF FIR FILTERS 1889

in general, converge. We have have found as in [2] that it is


necessary to use a single point update procedure for some iter-
ations to obtain robust convergence [29]. Thus, by maintaining
B -20Ot-1
.r
the approach of using a sequence of equality constrained L2
ci minimizations, best peak constrained LB multiband filters can
’ -40 be readily designed without the use of ‘don’t care’ regions. A
program for the multiband case using the criterion described in
0 1
w/R this paper is also available from the authors or electronically.
Adams et al. address algorithm issues concerning the design

0
Oe2

0
t
1
0.2 0.4
wlx
0.6 0.8 1
of multiband filters via the quadratic program formulation in
detail in [2].

VI. CONCLUSION
Fig. 8 Best constrained La filter (N = 61,w, = 0.3~)
with 6, = 5, = 0.02 and a specified passband edge at We have considered the design of optimal filters and have
0 . 2 8 5 ~ . llEll; = 0.006893. The “induced” stopband edge is discussed the implicit assumptions associated with the use of
U,, = 0.3376~. explicitly specified transition bands in the frequency domain
design of FIR filters. We have also put forth the notion that
two frequencies. As in Section IV-B, the upper and lower
explicitly specified transition bands have been introduced in
bound functions are used to constrain the frequency response
the filter design literature in part as an indirect approach for
amplitude only at its local extrema. This variation of the
dealing with Gibbs’ phenomenon occuring at the discontinu-
algorithm combines the approach of Adams’ with the approach ities in the desired frequency response. Moreover, the results
suggested in Section 111, in which a uniform L2 weighting is of Weisburn, Parks, and Shenoy suggest that if a ‘don’t care’
used. Like the uniformly L2 weighted approach, this variation region is used for filter design, then unless the input signals
avoids the infeasibility problems associated with the quadratic have no energy in the ‘don’t care’ region, the optimality of the
program approach. best Chebyshev and L2 filters in the operator norm sense is
E. Remarks on Comparisons problematic. Because the minimization of the Chebyshev norm
requires the use of a specified transition band, this suggests that
As mentioned above, when the present algorithm yields an the Chebyshev criterion is better suited as a constraint rather
equiripple filter, it gives the same result as the PM algorithm than the primary optimization criterion. This is also consistent
when the PM algorithm is used with the appropriate speci- with the motivation Adams gives to support the constrained
fications. In addition, the frequency responses of the filters L2 approach described in [ll.
produced by the algorithm described in this paper are similar This paper i) proposes that the unweighted (or weighted)
to those obtained by the approach of Adams. It should be noted integral square error be minimized such that the peak errors
that although the responses are similar, they are not exactly lie within the specified tolerances and ii) describes a simple
the same in general. This is because the quadratic program multiple exchange algorithm for lowpass filter design accord-
formulation Adams gives is not equivalent to the formulation ing to this design formulation that is robust and efficient.
given in section 3. The differences lie in the weighting of the Because the proposed approach does not ignore the L2 error
error and the way in which the constraints are imposed. Note around the band edge, it does not implicitly assume that
that when the algorithm presented here and that of Adams each signals in the input class have no frequency content there.
give an equiripple PM filter with the same lower and upper In addition, the constraints imposed on the peak errors can
bound functions and the same transition band (“induced” in the be made arbitrarily small. For a fixed cut-off frequency, it
case of the present algorithm) then, certainly the two filters also gives the best L2 filter and a continuum of Cheby-
are identical. shev filters as special cases. With the weighting function
The approaches of [13]-[16] should also be mentioned. W ( w ) = 1, the optimal filter coefficients are obtained by
Although they employ implicitly defined transition bands and making a simple additive correction to the Fourier series
provide direct control of the peak errors, those algorithms i) coefficients.
do not incorporate the L2 error into the design procedure and The approach taken in this paper is distinct from many other
ii) provide only approximate control of the location of the cut- filter design methods because it does not exclude from the
off frequency. (Although for lowpass filter design, limitation integral square error a region around the cut-off frequency,
ii) can be overcome 1261, [27]). In addition, it should also be and yet, it overcomes Gibbs’ phenomenon without resorting
noted that while the program of [33] is very flexible, it does to windowing or ‘smoothing out’ the discontinuity of the
not incorporate the L2 error. ideal lowpass filter. The algorithm is also appealing because
it can be implemented with an especially simple Matlab
F. Multiband Filters program, Versions of this and other programs (multiband, etc.)
When used for the design of multiband filters, the simple can be found on the World Wide Web at URL http:llwww-
algorithm we have described for lowpass filter design does not, dsp.rice.edu.

Authorized licensed use limited to: Qilu University of Technology. Downloaded on April 15,2023 at 10:29:59 UTC from IEEE Xplore. Restrictions apply.
1890 E E E TRANSACTIONS ON SIGNAL PROCESSING, VOL. 44, NO. 8, AUGUST 1996

APPENDIXA
ON OPTIMALITY AND CONVERGENCE
To discuss the optimization problem discussed above, define
the feasible set Q:
Q = {U E R"+l: L(w,) 5 A ( w ; ) 5 U ( w ; ) for the local
extremal frequencies w, of A ( w ) } . (43)
The problem is to minimize 1 1
311;over the set Q. Since Q is
closed, and IIA - 0 11 ; is a convex function of a, a minimizer
exists. Usually, uniqueness of a minimizer is established by
ascertaining the convexity of the feasible set. However, the
set Q is not convex as is easily explained: Note that a
maximally flat frequency response will always be feasible (it
has extremal frequencies only at 0 and T , where A ( w ) equals
1 and 0, respectively). If a filter is obtained by averaging a
feasible equiripple (PM) filter and maximally flat (Herrmann)
filter, then the frequency response amplitude of the filter will
have local extrema around the cut-off frequency, which will
generally violate the upper and lower bound functions L ( w )
and U ( w ) . Therefore, Q is not convex. Because Q lacks
convexity, it is necessary to use a different perspective to
discuss optimality, as follows.
Although the minimization of 1 1311;over Q is not a
quadratic program, it is closely related to one. Suppose the
L2 weighting function is set to unity throughout the following
discussion. If the algorithm converges, then the filter obtained
by the algorithm is optimal in the sense that it is the solution 0.327 0.3386
to a meaningful quadratic program: Given a filter produced d
7
C

by the algorithm, define the two 'induced' band edges as (b)


follows: Define the induced passband edge w,, to be the Fig. 9. Passband and stopband detnls of the amplitude shown in Fig. 4.
highest frequency less than w, at which A(w) equals L ( w ) . w a = 0.2613a,wZp = 0.2728a,w,, = 0.3270a,wb = 0 . 3 3 8 6 ~ .(a)
Passband detail. (b) Stopband detail.
Similarly, define the induced stopband edge w i s to be the
lowest frequency greater than wo at which A ( w ) equals U ( w ) .
See Fig. 9. Second, label the two extremals of A ( w ) that 2) filters obtained by solving the quadratic program (7, 8,
are adjacent to wiP and w,,: Let w, be the frequency at but with W ( w ) = l'v'w) with wider transition widths
which A ( w ) achieves its first local maximum to the left (w, - wp > wb - w,) have peak errors around w, that
of w,. Similarly, let W b be the frequency at which A ( w ) exceed 6, andor 6,.
achieves its first local minimum to the right of w,. With these Although we have not proven that the filters obtained by the
definitions of w a , W b , wzp and w,,, it can be said that if wp algorithm are global minimizers of IIE I I over Q, the quadratic
and w, are two frequencies satisfying wa 5 wp 5 wzp, and program analysis given here is highly suggestive.
w,, 5 w, 5 W b , then the filter obtained by the algorithm Regarding the convergence of the algorithm, the noncon-
described above solves the quadratic program (7, 8), where vexity of Q has little bearing. Nonconvexity of the feasible
the weight function W ( w ) = 1 for all w E [O,n]is used and set is a problem for algorithms that proceed by updating
not the weight function of expression (9). one feasible solution to obtain another feasible solution by
The intervals [U,, w,,] and [w,,, W b ] give insight into the moving within the feasible set. The algorithm described above
properties of the solution. If w, E [w,,, wb] but wp is taken to begins with the best unconstrained minimizer, and each filter
be a frequency less than w,, then the solution to the quadratic produced during the course of the algorithm is infeasible. This
program (7,8) is a filter having peak errors in the passband that sequence of filters approaches the feasible set. The algorithm
exceed 6,. On the other hand, if wp is taken to be a frequency terminates exactly when feasibility is achieved. The progress
greater than wzp,then the L2 error of the resulting filter must be of this kind of algorithm is affected less by the lack of feasible
greater (because it is subject to additional constraints). Similar set convexity.
statements are true for w,. Therefore, these values have the The quadratic program analysis above also suggests that
following two properties: a unique minimizer exists (the QP has a unique minimizer),
1) filters obtained by solving the quadratic program (7, 8, although we do not give a proof of this here. Note that because
but with W ( w ) = lb'w) with narrower transition widths the algorithm always begins with the best unconstrained L2
( w , - wp < w,, - w Z p )necessarily have a greater L2 error filter, there is no ambiguity about the initial filter used in the
(assuming same the peak constraints); iterative procedure above. However, as mentioned above, we

Authorized licensed use limited to: Qilu University of Technology. Downloaded on April 15,2023 at 10:29:59 UTC from IEEE Xplore. Restrictions apply.
1891
SELESNICK et al.: CONSTRAINED LEAST SQUARE DESIGN OF FIR FILTERS

function h = cl2lp(m,no,up,lo,L)
% Constrained L2 Low Pass FIR filter design
% Author: Ivan Selesnick, Rice University, 1994
% See: Constrained Least Square Design of FIR
% Filters Without Specified Transition Bands
% by I . W.Selesnick, M.Lang, C .S .Burrus
% h : 2*m+l filter coefficients
% m : degree of cosine polynomial
Fig. 11. Matlab program localmax.
% no : cut-off frequency in (0,pi)
% up : [upper bound in passband, stopband]
% lo : [loner bound in passband, stopband] programming. For multiband filter design, we have found as in
% L : grid size [2] that it is necessary to modify the update procedure for some
% example iterations to obtain robust convergence. It should be noted,
% up = C1.02, 0.023; lo = c0.98, -0.021; however, that because the constrained La approach of Adams
% h = ~121p(30,0.3*pi,up,lo,2~11);
can be formulated as a quadratic program, it is assured that the
r = sqrt(2) ; w = [O:L]’*pi/L; optimal solution (if it exists) to the problem posed by him is
Z = zeros(2*L-1-2*m.l) ; q = round(ao*L/pi) : unique, and the algorithm of [2] is guaranteed to converge to it.
U = [up(I)*ones(q, 1) ; up(2)*ones(L+l-q, 111 ;
1 = [lo(i)*ones(q,i); 10(2)*ones(L+i-q,i)l;
APPENDIXB
c = 2*[wo/r; [sin(wo*[l:mI) ./Ci:mll ’]/pi;
a = c; best L2 cosine coefficients A MATLABPROGRAM
mu = Cl; % Lagrange multipliers The Matlab program c121p in Fig. 10 implements the
SN = le-6; % Small Number algorithm described in Section IV-B of the paper. The program
while 1 localmax in Fig. 11 computes the indexes of a vector
% ----- calculate A .........................
corresponding to its local maxima by comparing each vector
A = f f t ( [a( 1)w; a(2:m+l) ;Z;a(m+l: -1 :2)1) ;
element with the two adjacent elements. This version of
A = real(A(l:L+l))/2;
% ----- find extremals ...................... c 1 2 l p does not use Newton’s method to refine the position
kmax = local,max(A) ; kmin = local,max(-A) ; of the extrema of A ( w ) ; Therefore, a possibly dense grid is
kmax = kmax( A(kmax) > u(kmax)-lO*SN 1; required in order to obtain convergence ( L 2 2r10g2 lom1 A >.
kmin = hin( A(kmin) < l(kmin)+lO*SN ) ; version using Newton’s method (and other programs) can be
% ----- check stopping criterion ------------ obtained from the authors or electronically on the World Wide
Eup = A(bax)-u(hax); Elo = l(kmin)-’A(kmin); Web.
E = max([Eup; Elo; 01); if E < SN, break, end
% ----- calculate new multipliers -----------
nl = length(kmax); n2 = length(kmin); ACKNOWLEDGMENT
o = [ones(ni,m+i) ; -ones(n2,m+i)l; The authors wish to express appreciation to Prof. H. W.
G = U .* cos(w([kmax;hinl)*[O:ml); SchiiBler for his interest, careful review of the manuscript,
G(: ,1) = G ( : ,l)/r; observations, and valuable suggestions. They also wish to
d = [u(kmax); -l(kmin)l; thank the anonymous reviewers. Responding to their com-
mu = (G*G’)\(G*c-d);
ments helped us improve the paper.
e---- remove negative multiplier ----------
[min-mu,K] = min(mu) ;
REFERENCES
while min-mu < 0
G(K,:) [I; d(K) = cl;
=i
J. W. Adams, “FIR digital filters with least squares stop bands subject
mu = (G*G ’ ) \ (G*c-d) : to peak-gain constraints,” IEEE Trans. Circuits Syst., vol. 39, no. 4, pp.
[min-mu,K] = min(mu) ; 376-388, Apr. 1991.
end J. W. Adams et al., “New approaches to constrained optimization of
digital filters,” in Proc. IEEE Int. Symp. Circuits S.W., May 1993, pp.
% ----_determine new coefficients ---------- 80-83.
a = c-G’*mu; J. W. Adams and A. N. Willson, Jr, “On the fast design of high-orderFIR
end digital filters,” ZEEE Trans. Circuits Syst., vol. 32, no. 9, pp. 958-960,
h = [a(m+l:-l:2); a(l)*r; a(2:n+i)1/2; Sept. 1985.
A. Antoniou, “Accelerated procedure for the design of equiripple
nonrecursive digital filters,” Proc. Inst. Elec. Eng., pt. G, vol. 129, no.
Fig. 10. Matlab program c121p. 1, pp. 1-10, Feb. 1982.
-, “New improved method for the design of weighted-Chebyshev,
nonrecursive, digital filters,” IEEE Trans. Circuits Syst., vol. CAS-30,
have not proven the convergence of the algorithm presented no. 10, pp. 740-750, Oct. 1983.
F. Bonzanigo, “Some improvements to the design programs for equirip-
in this paper but have found it to converge reliably in practice ple FIR filters,” in Proc. IEEE Int. Con$ Acoust., Speech, Signal
for lowpass filter design. Indeed, even though it can be posed Processing, 1982, pp. 214-271.
C. S. Bunus, “Multiband least squares FIR filter design,” IEEE Trans.
as a sequence of similar quadratic programs, the convergence Acoust., Speech, Signal Processing, vol. 43, no. 2, pp. 412-421, Feb.
of this algorithm is not supported by the theory of quadratic 1995.

Authorized licensed use limited to: Qilu University of Technology. Downloaded on April 15,2023 at 10:29:59 UTC from IEEE Xplore. Restrictions apply.
1892 IEEE TRANSACTIONS ON SIGNAL PROCESSING, VOL. 44, NO 8, AUGUST 1996

IS] C. S. Burrus, A. W. Soewito, and R. A. Gopinath, “Least squared error [36] D W Tufts and J T Francis, “Designing digital low-pass fil-
FIR filter design with transition bands,” IEEE Trans. Acoust., Speech, ters-Comparison of some methods and cnteria,” IEEE Trans Audzo
Signal Processing, vol. 40, no. 6, pp. 1327-1340, June 1992. Electroacoust., vol AE-18, no 4, pp 487-494, Dec. 1970
[SI S . Ebert and U. Heute, “Accelerated design of linear or minimum phase [371 D W Tufts, D W. Rorabacher, and W E Mosier, “Designing simple
FIR filters with a Chebyshev magnitude response,” Proc. Inst. Elec. effecbve digital filters,” IEEE Trans Audio Electroacoust., vol AE-18,
Eng., pt. G, vol. 130, no. 6, pp. 267-270, Dec. 1983. no 2, pp 142-158, June 1970
[lo] R. Fletcher. Practical Methods of Optimization. New York Wiley, [38] B A Weisbum, T W Parks, and R G Shenoy, “Error critena for filter
1987. design,” in Proc IEEE Int Con$ Acoust , Speech, Signal Processmg,
[11] D. Goldfarb and A. Idnani, “A numerically stable dual method for vol 3, Apr 1994, pp 565-568
solving strictly convex quadratic programs,” Math. Programming, vol.
27, pp. 1-33, 1983.
1121 R. A. Gopinath, “Some thoughts on least-square error optimal windows,”
in Proc. IEEE Int. Symp. Circuits Syst., vol. 2, May-June 1994, pp.
413416. Ivan W. Selesnick (M’95) received the B.S and
[13] 0 . Henmann, “Design of nonrecursive filters with linear phase,” Elec- M.E.E degrees in electrical engineenng in 1990 and
tron. Lett., vol. 6, no. 11, pp. 328-329, May 28, 1970; also in [25]. 1991, respechvely, from Rice University, Houston,
[14] 0. Heimann and H. W. Schuessler, “On the design of nonrecursive TX He is currently working toward the Ph D
digital filters,” IEEE Arden House Workshop, Jan. 1970. degree at Rice University
[15] E. Hofstetter, A. Oppenheim, and J. Siegel, “A new technique for the He received a DARPA-NDSEG fellowship in
design of nonrecursive digital filters,” in Proc. Fifh Ann. Princeton 1991 He has been employed by McDonnell Dou-
Con$ Inform. Sei. Syst., Oct. 1971, pp. 64-72; also in [2S]. glas and IBM, working on neural networks and
[16] -, “On optimum nonrecursive digital filters,” in Proc. Ninth Aller- expert systems His current research interests are in
ton Con$ Circuits System Theory, 1971, pp. 789-798; also in [25]. the area of digital signal processing, in particular,
[17] M. Lang and J. Bamberger, “Nonlinear phase FTR filter design with fast algonthms for DSP, digital filter design, the
minimum LS error and additional constraints,” in Proc. IEEE Int. Con5 theory and application of wavelets, and the application of Grobner bases.
Acoust., Speech, Signal Processing, Apr. 1993, pp. 57-60. Mr. Selesnick is a member of Eta Kappa Nu, Phi Beta Kappa, and Tau
[18] M. Lang and J. Bamberger, “Nonlinear phase FIR filter design according Beta Phi.
to the Z2 norm with constraints for the complex error,” Signal Process-
ing, vol. 36, no. 1, pp. 31-40, Mar. 1994. Reprinted in July issue to
correct typesetting errors.
[19] M. Lang and B.-C. Frenzel, “Polynomial root finding,” IEEE Signal
Processing Lett., vol. 1, no. 10, pp. 141-143, Oct. 1994. Markus Lang was born in Zweibruecken, Germany He received the Diploma
[20] D. G. Luenberger. Introduction to Linear and Nonlinear Programming. Engineer and Doctor of Technology degrees from the University of Erlangen-
Reading, MA: Addison-Wesley, 1984. Nuremberg, Germany, in 1988 and 1993, respectively
[2l] G. W. Medlin, J. W. Adams, and C. T. Leondes, “Lagrange multiplier From 1988 to 1993, he was with the Institute of Communication Theory at
approach to the design of FIR filters for multirate applications,” IEEE the University of Erlangen-Nuremberg,Germany, as a teaching and research
Trans. Circuits Syst., vol. 35, no. 10, pp. 1210-1219, Oct. 1988. assistant From 1993 to 1995, he was visihng Rice University, Houston, TX on
1221 T. W. Parks and C. S . Burrus, Digital Filter Design. New York Wiley, a Feodor Lynen scholarship by the Alexander von Humboldt Foundation. He
1987. is currently workmg at the Center for Medical Visualization and Diagnostic
[23] M. J. D. Powell, Approximation Theory and Methods. Cambridge, U K
Systems, Bremen, Germany His research interests include digital filter design,
Cambridge University Press, 1981.
numencal methods, wavelet theory, and image processing, especially for
[24] L. Rabiner, J. Kaiser, and R. Schafer, “Some considerations in the
design of multiband finite-impulse-responsedigital filters,” IEEE Trans. medical images
Acoust., Speech, Signal Processing, vol. ASSP-22, no. 6, pp. 462472,
Dec. 1974.
[25] L. R. Rabiner and C. M. Rader, Eds., Digital Signal Processing. New
York: IEEE, 1972. C. Sidney Burrus (S’55-M’6l-SM’75-F81) was
[26] I. W. Selesnick and C. S . Burrus, “Exchange algorithms that complement born in Abilene, TX, on October 9, 1934. He
the Parks-McClellan algorithm for linear phase FIR filter design,” IEEE received the B.A., B S E E , and M S degrees from
Trans. Circuits Systems 11, to appear. Rice University, Houston, TX, in 1957, 1958, and
[27] -, “Some exchange algorithms complementing the Parks-
McClellan program for filter design,” in Proc. Int. Con$ Digital Signal 1960, respechvely, and the Ph D degree from Stan-
ford University, Stanford, CA, in 1965
Processing, Limassol, Cyprus, June 1995, pp. 804-809.
[28] I. W. Selesnick, M. Lang, and C. S. Bums, “Constrained least square From 1960 to 1962,he taught at the Navy Nuclear
design of FIR filters without specified transition bands,” in Proc. IEEE Power School, New London, CT, and during the
Int. Con$ Acoust., Speech, Signal Processing, vol. 2, May 1995, pp. summers of 1964 and 1965, he was a Lecturer
1260-1263. in electncal engineenng at Stanford University. In
[29] ~, “A simple algorithm for constrained least square design of 1965, he ioined the faculty at Rice Universitv. where
multiband FIR filters without specified transition bands,” Tech. Rep. he is now Professor of Elecmcal and Compute1 Ehgineering and Director of
ECE 9601, Rice Univ., Houston, TX, 1996. the Computer and Information Technology Institute From 1972 tn 1978, he
[30] R. G. Shenoy, D. Bumside, and T. W. Parks, “Fourier analysis of linear was Master of Lovett College at Rice Umversity, and from 1984 to 1992, he
periodic systems and multirate filter design,” in Paper Summaries 1992 was chairman of the ECE Department at Rice Dunng 1975-1976 and again
IEEE DSP Workshop, 1992, p. 2.4.1. dunng 1979-1980, he was a Guest Professor at the Universitaet Erlangen-
[31] R. G. Shenoy, D. Burnside, and T. W. Parks, “Linear periodic sys- Nuernberg, Germany Dunng the summer of 1984, he was a Visiting Fellow
tems and multirate filter design,” IEEE Trans. Acoust., Speech, Signal at Tnnity College, Cambridge University, Cambridge, England, and dunng the
Processing, vol. 42, no. 9, pp. 2242-2256, Sept. 1994. academic year 1989-1990, he was a Visiting Professor at the Massachusetts
[321 D. 3. Shpak and A. Antoniou, “A generalized Remez method for the Institute of Technology, Cambndge, MA He has co-authored four books on
design of FIR digital filters,” IEEE Trans. Circuits Syst., vol. 37, no. 2, digital signal processing
pp. 161-174, Feb. 1990. Dr. Burrus IS a member of Tau Beta Pi and Sigma Xi He has received
[33] K. Steiglitz, T. W. Parks, and J. F. Kaiser, “METEOR: A constraint- teaching awards at Rice in 1969, 1974, 1975, 1976, 1980, and 1989, an IEEE
based FTR filter design program,” IEEE Trans. Signal Processing, vol. S-ASSP Semor Award in 1974, a Senior Alexander von Humboldt Award in
40, no. 8, pp. 1901-1909, Aug. 1992. 1975, a Senior Fulbright Fellowship in 1985, and was a Distinguished Lecturer
[34] G. Strang. Introduction to Applied Mathemafics. Wellesley, MA: Cam- for the Signal Processing Society and for the Circuits and Systems Society
bridge University Press, 1986. from 1989 through 1992 He received the Society Award from the IEEE Signal
[35] J. L. Sullivan and J. W. Adams, “A new nonlinear optimization Processing Society in 1995 and was recently appointed the Maxfield and
algorithm for asymmetric FTR digital filters,” in Proc. IEEE Int. Symp. Oshman Professor at Rice He served on the IEEE S-SP ADCOM for three
Circuits Syst., vol. 2, May-June 1994, pp. 541-544. years

Authorized licensed use limited to: Qilu University of Technology. Downloaded on April 15,2023 at 10:29:59 UTC from IEEE Xplore. Restrictions apply.

You might also like