Section 1 introduced some important remarks regarding the behavior of extrema points and transition bands in l2l2 and l∞l∞ filters. As one increases the constraints on an l2l2 filter, the result is a filter whose frequency response looks more and more like an l∞l∞ filter.
(Reference) introduced the frequency-varying problem and an IRLS-based method to solve it. It was also mentioned that, while the method does not solve the intended problem (but a similar one), it could prove to be useful for the CLS problem. As it turns out, in CLS design one is merely interested in solving an unweighted, constrained least squares problem. In this work, we achieve this by solving a sequence of weighted, unconstrained least squares problems, where the sole role of the weights is to "constraint" the maximum error of the frequency response at each iteration. In other words, one would like to find weights ww such that
min
h
∥
D
(
ω
)
-
H
(
ω
;
h
)
∥
2
subject
to
∥
D
(
ω
)
-
H
(
ω
;
h
)
∥
∞
≤
τ
∀
ω
∈
[
0
,
ω
p
b
]
∪
[
ω
s
b
,
π
]
min
h
∥
D
(
ω
)
-
H
(
ω
;
h
)
∥
2
subject
to
∥
D
(
ω
)
-
H
(
ω
;
h
)
∥
∞
≤
τ
∀
ω
∈
[
0
,
ω
p
b
]
∪
[
ω
s
b
,
π
]
(5)is equivalent to
min
h
∥
w
(
ω
)
·
(
D
(
ω
)
-
H
(
ω
;
h
)
)
∥
2
min
h
∥
w
(
ω
)
·
(
D
(
ω
)
-
H
(
ω
;
h
)
)
∥
2
(6)Hence one can revisit the frequency-varying design method and use it to solve the CLS problem. Assuming that one can reasonably approximate l∞l∞ by using high values of pp, at each iteration the main idea is to use an lplp weighting function only at frequencies where the constraints are exceeded. A formal formulation of this statement is
w
ϵ
(
ω
)
=
|
ϵ
(
ω
)
|
p
-
2
2
if
|
ϵ
(
ω
)
|
>
τ
1
otherwise
w
ϵ
(
ω
)
=
|
ϵ
(
ω
)
|
p
-
2
2
if
|
ϵ
(
ω
)
|
>
τ
1
otherwise
(7)Assuming a suitable weighting function existed such that the specified tolerances are related to the frequency response constraints, the IRLS method would iterate and assign rather large weights to frequencies exceeding the constraints, while inactive frequencies get a weight of one. As the method iterates, frequencies with large errors move the response closer to the desired tolerance. Ideally, all the active constraint frequencies would eventually meet the constraints. Therefore the task becomes to find a suitable weighting function that penalizes large errors in order to have all the frequencies satisfying the constraints; once this condition is met, we have reached the desired solution.
One proposed way to find adequate weights to meet constraints is given by a polynomial weighting function of the form
w
(
ω
)
=
1
+
ϵ
(
ω
)
τ
p
-
2
2
w
(
ω
)
=
1
+
ϵ
(
ω
)
τ
p
-
2
2
(8)where ττ effectively serves as a threshold to determine whether a weight is dominated by either unity or the familiar lplp weighting term. Figure 4 illustrates the behavior of such a curve.
In practice the method outlined above has proven robust particularly in connection with the specified transition band design. Consider the least squares design in Figure 5 (using a length-21 Type-I linear phase low-pass FIR filter with linear transition frequencies {0.2,0.25}{0.2,0.25}). This example illustrates the typical effect of CLS methods over l2l2 designs; the largest error (in an l∞l∞ sense) can be located at the edges of the transition band. Figures Figure 6 and Figure 7 illustrate design examples using the proposed approach. Figure 6 shows an example of a mild constraint (τ=0.6τ=0.6), whereas Figure 7 illustrates an advantage of this method, associated to a hard constraint (τ=0.3τ=0.3). The method is trying iteratively to reduce the maximum error towards the constraint; however the specified constraint in Figure 7 is such that even at the point where an equiripple response is reached for the specified transition bands the constraint is not met. At this point the method converges to an optimal lplp solution that approximates equiripple as pp increases (the examples provided use p=50p=50).
A different behavior occurs when no transition bands are defined. Departing from an initial l2l2 guess (as shown in Figure 8.a) the proposed IRLS-based CLS algorithm begins weighting frequencies selectively in order to reduce the l∞l∞ error towards the constraints ττ at each iteration. Eventually an equiripple behavior can be observed if the constraints are too harsh (as in Figure 8.b). The algorithm will keep weighting until all frequencies meet the constraints (as in Figure 8.c). The absence of a specified transition band presents some ambiguity in defining valid frequencies for weighting. One cannot (or rather should not) apply weights too close to the transition frequency specified as this would result in an effort by the algorithm to create a steep transition region (which as mentioned previously is counterintuitive to finding an equiripple solution). In a sense, this would mean having two opposite effects working at the same time and the algorithm cannot accommodate both, usually leading to numerical problems.
In order to avoid these issues, an algorithm can be devised that selects a subset of the sampled frequencies for weighting purposes at each iteration. The idea is to identify the largest ripple per band at each iteration (the ripple associated with the largest error for a given band) and select the frequencies within that band with errors equal or smaller than such ripple error. In this way one avoids weighting frequencies around the transition frequency. This idea is illustrated in Figure 9.
The previous example is fundamental since it illustrates the relevance of this method: since for a particular transition band the tightest constraint that one can get is given by the equiripple (or minimax) design (as shown in Section 1), a problem might arise when specifications are tighter than what the minimax design can meet. Adams found this problem (as reported in [1]); his method breaks under these conditions. The method proposed here overcomes an inadequate constraint and relaxes the transition band to meet the constraint.
It is worth noting that the polynomial weighting form works even when no transition bands are specified (this must become evident from Figure 8.c above). However, the user must be aware of some practical issues related to this approach. Figure 10 shows a typical CLS polynomial weighting function. Its "spiky" character becomes more dramatic as pp increases (the method still follows the homotopy and partial updating ideas from previous sections) as shown in Figure 10.b. It must be evident that the algorithm will assign heavy weights to frequencies with large errors, but at pp increases the difference in weighting exaggerates. At some point the user must make sure that proper sampling is done to ensure that frequencies with large weights (from a theoretical perspective) are being included in the problem, without compromising conputational efficiency (by means of massive oversampling, which can lead to ill-conditioning in numerical least squares methods). Also as pp increases, the range of frequencies with signifficantly large weights becomes narrower, thus reducing the overall weighting effect and affecting convergence speed.
A second weighting form can be defined where envelopes are used. The envelope weighting function approach works by assigning a weight to all frequencies not meeting a constraint. The value of such weights are assigned as flat intervals as illustrated in Figure 11. Intervals are determined by the edge frequencies within neighborhoods around peak error frequencies for which constraints are not met. Clearly these neighborhoods could change at each iteration. The weight of the kk-th interval is still determined by our typical expression,
w
k
(
ω
)
=
|
ϵ
(
ω
k
+
)
|
p
-
2
2
w
k
(
ω
)
=
|
ϵ
(
ω
k
+
)
|
p
-
2
2
(9)where ωk+ωk+ is the frequency with largest error within the kk-th interval.
Envelope weighting has been applied in practice with good results. It is particularly effective at reaching high values of pp without ill-conditioning, allowing for a true alternative to minimax design. Figure 12 shows an example using τ=0.4τ=0.4; the algorithm managed to find a solution for p=500p=500. By specifying transition bands and unachievable constraints one can produce an almost equiripple solution in an efficient manner, with the added flexibility that milder constraints will result in CLS designs.