part 2: fir filters – weighted-chebyshev method …andreas/iscastutorial/part 2-fir...
TRANSCRIPT
-
Part 2: FIR Filters Weighted-ChebyshevMethod
Tutorial ISCAS 2007
Copyright 2007- Andreas AntoniouVictoria, BC, Canada
Email: [email protected]
July 24, 2007
Frame # 1 Slide # 1 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Introduction
The weighted-Chebyshev method for the design of FIR filters isan iterative multi-variable optimization method based on theRemez Exchange Algorithm.
It can be used to design optimal FIR (nonrecursive) filters witharbitrary amplitude responses.
Note: The material for this module is taken from Antoniou,Digital Signal Processing: Signals, Systems, and Filters,Chap. 15.
Frame # 2 Slide # 2 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Introduction Historical Evolution
Herrmann published a short paper in Electronics Letters inMay 1970 on the design of FIR filters.
Frame # 3 Slide # 3 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Introduction Historical Evolution
Herrmann published a short paper in Electronics Letters inMay 1970 on the design of FIR filters.
This paper was followed by a series of papers by Parks,McClellan, Rabiner, and Herrmann during the earlyseventies.
Frame # 3 Slide # 4 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Introduction Historical Evolution
Herrmann published a short paper in Electronics Letters inMay 1970 on the design of FIR filters.
This paper was followed by a series of papers by Parks,McClellan, Rabiner, and Herrmann during the earlyseventies.
These developments led in 1975 to the well-knownMcClellan-Parks-Rabiner computer program for the designof FIR filters, which has found widespread applications.
Frame # 3 Slide # 5 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Introduction Historical Evolution
Herrmann published a short paper in Electronics Letters inMay 1970 on the design of FIR filters.
This paper was followed by a series of papers by Parks,McClellan, Rabiner, and Herrmann during the earlyseventies.
These developments led in 1975 to the well-knownMcClellan-Parks-Rabiner computer program for the designof FIR filters, which has found widespread applications.
Enhancements to the weighted-Chebyshev method wereproposed by Antoniou during the early eighties.
Frame # 3 Slide # 6 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Problem Formulation
Consider an FIR filter characterized by the transfer function
H (z) =N1n=0
h(nT )zn
and assume that N is odd, the impulse response is symmetrical, and the sampling frequency is s = 2 .
Frame # 4 Slide # 7 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Problem Formulation
The frequency response of the filter can be expressed as
H (ej) = ejcPc()where
Pc() =c
k=0ak cos k (A)
is the gain function and
a0 = h(c)ak = 2h(c k ) for k = 1, 2, . . . , cc = (N 1)/2
Note that Pc() is the frequency response of a noncausalversion of the required filter.
Frame # 5 Slide # 8 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Error Function
An error function E () can be constructed as
E () = W ()[D() Pc()]where ejcD() is the idealized frequency response of thedesired filter, W () is a weighting function, and
Pc() =c
k=0ak cos k
Frame # 6 Slide # 9 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Error Function
An error function E () can be constructed as
E () = W ()[D() Pc()]where ejcD() is the idealized frequency response of thedesired filter, W () is a weighting function, and
Pc() =c
k=0ak cos k
If |E ()| is minimized such that|E ()| = |W ()[D() Pc()]| p for (B)
with respect a set of frequencies in the interval [0, ], say, a filter can be obtained in which
|E0()| = |D() Pc()| p|W ()| for (C)
Frame # 6 Slide # 10 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Lowpass Filters
In the case of a lowpass filter, the minimization of |E ()|will force the inequality
|E0()| = |D() Pc()| p|W ()| for (C)
where
D() ={
1 for 0 p0 for a
Frame # 7 Slide # 11 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Lowpass Filters
In the case of a lowpass filter, the minimization of |E ()|will force the inequality
|E0()| = |D() Pc()| p|W ()| for (C)
where
D() ={
1 for 0 p0 for a
In effect, a minimization algorithm will force the actual gainfunction Pc() to approach the ideal gain function D().
Frame # 7 Slide # 12 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Lowpass Filters Contd
1.0
!p !a!
Gai
n
D(!)
E0(!)
Pc(!)
Frame # 8 Slide # 13 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Lowpass Filters Contd If we choose the weighting function
W () ={
1 for 0 ppa
for a then from Eq. (C), i.e.,
|E0()| = |D() Pc()| p|W ()| for (C)
we get
|E0()| {
p for 0 pa for a
Frame # 9 Slide # 14 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Minimax Problem
The most appropriate approach for the solution of theoptimization problem just described is to solve the minimaxproblem
minimizex
{max
|E ()|}where
x = [a0 a1 ac ]T
Frame # 10 Slide # 15 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Minimax Problem
The most appropriate approach for the solution of theoptimization problem just described is to solve the minimaxproblem
minimizex
{max
|E ()|}where
x = [a0 a1 ac ]T By virtue of the so-called alternation theorem, there is a
unique equiripple solution of the above minimax problem.
Frame # 10 Slide # 16 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Minimax Problem
The most appropriate approach for the solution of theoptimization problem just described is to solve the minimaxproblem
minimizex
{max
|E ()|}where
x = [a0 a1 ac ]T By virtue of the so-called alternation theorem, there is a
unique equiripple solution of the above minimax problem.
Note that weighted-Chebyshev filters are so calledbecause they have an equiripple amplitude response justlike Chebyshev filters but are not related to Chebyshevfilters in any other way.
Frame # 10 Slide # 17 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Minimax Problem Contd
p a
1.0
Gai
n
D() Pc()
a
1+p
1-p
Frame # 11 Slide # 18 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Alternation Theorem
If Pc() is a linear combination of r = c + 1 cosine functions ofthe form
Pc() =c
k=0ak cos k
then a necessary and sufficient condition that Pc() be theunique, best, weighted-Chebyshev approximation to acontinuous function D() on , where is a dense andcompact subset of the frequency interval [0, ], is that theweighted error function E () exhibit at least r + 1 extremalfrequencies i in such that
0 < 1 < < rE (i ) = E (i+1) for i = 0, 1, . . . , r 1
and|E (i )| = max
|E ()| for i = 0, 1, . . . , r
Frame # 12 Slide # 19 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Alternation Theorem Contd
From the alternation theorem and Eq. (B), i.e.,
E () = W ()[D() Pc()] (B)we can write
E (i ) = W (i )[D(i) Pc(i )] = (1)ifor i = 0, 1, . . . , r , where is a constant.
Frame # 13 Slide # 20 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Alternation Theorem Contd
From the alternation theorem and Eq. (B), i.e.,
E () = W ()[D() Pc()] (B)we can write
E (i ) = W (i )[D(i) Pc(i )] = (1)ifor i = 0, 1, . . . , r , where is a constant.
The above system of equations can be put in matrix form as
1 cos 0 cos 0 cos 0 1W (0)1 cos 1 cos 1 cos 1 1W (1) 1 cos r cos r cos r (1)rW (r )
a0a1...
ac
=
D(0)D(1)
...
D(r1)D(r )
Frame # 13 Slide # 21 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Alternation Theorem Contd
If the extremal frequencies (or extremals for short) wereknown, coefficients ak and, in turn, the frequency responseof the filter could be computed using Eq. (A), i.e.,
Pc() =c
k=0ak cos k (A)
Frame # 14 Slide # 22 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Alternation Theorem Contd
If the extremal frequencies (or extremals for short) wereknown, coefficients ak and, in turn, the frequency responseof the filter could be computed using Eq. (A), i.e.,
Pc() =c
k=0ak cos k (A)
The solution of this system exists since the above(r + 1) (r + 1) matrix is known to be nonsingular.
Frame # 14 Slide # 23 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Remez Exchange Algorithm Contd
The Remez exchange algorithm is an iterative multivariablealgorithm that is naturally suited for the solution of theminimax problem just described.
It is based on the second optimization method of Remez.
Frame # 15 Slide # 24 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Basic Remez Exchange Algorithm Contd
1. Initialize extremal frequencies 0, 1, . . . , r and ensurethat an extremal is assigned at each band edge.
Frame # 16 Slide # 25 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Basic Remez Exchange Algorithm Contd
1. Initialize extremal frequencies 0, 1, . . . , r and ensurethat an extremal is assigned at each band edge.
2. Solve the system of equations to get and the coefficientsa0, a1, . . . , ac.
Frame # 16 Slide # 26 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Basic Remez Exchange Algorithm Contd
1. Initialize extremal frequencies 0, 1, . . . , r and ensurethat an extremal is assigned at each band edge.
2. Solve the system of equations to get and the coefficientsa0, a1, . . . , ac.
3. Using the coefficients a0, a1, . . . , ac, calculate Pc() andthe magnitude of the error
|E ()| = |W ()[D() Pc()]|
Frame # 16 Slide # 27 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Basic Remez Exchange Algorithm Contd
1. Initialize extremal frequencies 0, 1, . . . , r and ensurethat an extremal is assigned at each band edge.
2. Solve the system of equations to get and the coefficientsa0, a1, . . . , ac.
3. Using the coefficients a0, a1, . . . , ac, calculate Pc() andthe magnitude of the error
|E ()| = |W ()[D() Pc()]|4. Locate the frequencies
0,
1, . . . ,
at which |E ()| is
maximum and |E (i )| (these frequencies are potentialextremals for the next iteration).
Frame # 16 Slide # 28 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Basic Remez Exchange Algorithm Contd
5. Compute the convergence parameter
Q = max |E (i )| min |E (i )|
max |E (i )|where i = 0, 1, . . . , .
Frame # 17 Slide # 29 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Basic Remez Exchange Algorithm Contd
5. Compute the convergence parameter
Q = max |E (i )| min |E (i )|
max |E (i )|where i = 0, 1, . . . , .
6. Reject r superfluous potential extremals i accordingto an appropriate rejection criterion and renumber theremaining
i by setting i = i for i = 0, 1, . . . , r .
Frame # 17 Slide # 30 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Basic Remez Exchange Algorithm Contd
5. Compute the convergence parameter
Q = max |E (i )| min |E (i )|
max |E (i )|where i = 0, 1, . . . , .
6. Reject r superfluous potential extremals i accordingto an appropriate rejection criterion and renumber theremaining
i by setting i = i for i = 0, 1, . . . , r .
7. If Q > , where is a convergence tolerance (say = 0.01), repeat from step 2; otherwise continue to step 8.
Frame # 17 Slide # 31 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Basic Remez Exchange Algorithm Contd
5. Compute the convergence parameter
Q = max |E (i )| min |E (i )|
max |E (i )|where i = 0, 1, . . . , .
6. Reject r superfluous potential extremals i accordingto an appropriate rejection criterion and renumber theremaining
i by setting i = i for i = 0, 1, . . . , r .
7. If Q > , where is a convergence tolerance (say = 0.01), repeat from step 2; otherwise continue to step 8.
8. Compute Pc() using the last set of extremal frequencies;then deduce h(n), the impulse response of the requiredfilter, and stop.
Frame # 17 Slide # 32 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Initialization of Extremal FrequenciesBBands: : 1Extremals: : r+1 1 (12)Intervals: : r r (11)
B1
W0=B1/r
1 2 3 12
Bands: : 2Extremals: : r+1 1 (13)Intervals: : r-1 1 (11)
W1=B1/m1 W2=B2/m2
1 2 3 13
Bands: : 3Extremals: : r+1 1 (14)Intervals: : r-2 2 (11)
W1=B1/m1
W3=B3/m3W2=B2/m2
1 2 3 14
Frame # 18 Slide # 33 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Initialization of Extremal Frequencies Contd
For a filter with J bands with bandwidths B1, B2, . . . , BJ, thenumber of extremals and interval between extremals for eachband can be calculated by using the following formulas:
W0 = 1r + 1 JJ
j=1Bj
mj =(
BjW0
+ 0.5)
for j = 1, 2, . . . , J 1
and mJ = r J1j=1
(mj + 1)
Wj = Bjmj for j = 1, 2, . . . , J
where r = (N + 1)/2 and N is the filter length.Frame # 19 Slide # 34 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Updating of Extremals
In each iteration, the extremals need to be updated. This isdone by finding the maxima of the error function
|E ()| = |W ()[D() Pc()]|
Frame # 20 Slide # 35 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Updating of Extremals
In each iteration, the extremals need to be updated. This isdone by finding the maxima of the error function
|E ()| = |W ()[D() Pc()]| This could be done by solving the system
1 cos 0 cos 0 cos 0 1W (0)1 cos 1 cos 1 cos 1 1W (1) 1 cos r cos r cos r (1)rW (r )
a0a1...
ac
=
D(0)D(1)
...
D(r1)D(r )
for the coefficients ak and then calculating
Pc() =c
k=0ak cos k
and in turn E ().
Frame # 20 Slide # 36 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Updating of Extremals Contd
This approach is inefficient and may be subject tonumerical ill-conditioning, in particular if is small and N islarge.
Note: A 50 50 matrix is quite typical.
Frame # 21 Slide # 37 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Updating of Extremals Contd
An alternative and more efficient approach is to deduce analytically (by using Cramers rule) and then interpolatePc() on the r frequency points using the barycentric formof the Lagrange interpolation formula, as follows:
Frame # 22 Slide # 38 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Updating of Extremals Contd
An alternative and more efficient approach is to deduce analytically (by using Cramers rule) and then interpolatePc() on the r frequency points using the barycentric formof the Lagrange interpolation formula, as follows:
Calculate parameter as
=r
k=0
k D(k )rk=0 (1)k k
W ()
Frame # 22 Slide # 39 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Updating of Extremals Contd
With known, Pc() can be obtained as
Pc() =
Ck for = 0, 1, . . . , r1r1k=0
k Ckx xk
r1k=0
k
x xk
otherwise
where k = ri=0, i =k 1xk xi , k = r1i=0, i =k 1xk xiand Ck = D(k ) (1)k W (k )with x = cos and xi = cos i for i = 0, 1, . . . , r
Frame # 23 Slide # 40 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Rejection of Superfluous Potential Extremals
The problem formulation is such that there must be exactlyr + 1 extremals in each iteration.
Frame # 24 Slide # 41 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Rejection of Superfluous Potential Extremals
The problem formulation is such that there must be exactlyr + 1 extremals in each iteration.
Analysis will show that |E ()| can have as many asr + 2J 1 maxima where J is the number of bands.If in any iteration the number of maxima exceeds r + 1,then the iteration is said to have generated superfluouspotential extremals.
Frame # 24 Slide # 42 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Rejection of Superfluous Potential Extremals Contd
In the standard McClellan, Rabiner, and Parks algorithm,this difficulty is circumvented by rejecting the rpotential extremals
i that yield the lowest error |E ()|.
Frame # 25 Slide # 43 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Computation of Impulse Response
The impulse response in Step 8 of the algorithm can bedetermined by recalling that function Pc() is the frequencyresponse of a noncausal version of the required filter.
Frame # 26 Slide # 44 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Computation of Impulse Response
The impulse response in Step 8 of the algorithm can bedetermined by recalling that function Pc() is the frequencyresponse of a noncausal version of the required filter.
The impulse response of the noncausal filter, denoted ash0(n) for c n c, can be determined by computingPc(k) for k = 0, 1, . . . , c where = 2/N, and thenusing the inverse discrete Fourier transform.
Frame # 26 Slide # 45 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Computation of Impulse Response Contd
It can be shown that
h0(n) = h0(n) = 1N
{Pc(0) +
ck=1
2Pc(k) cos(
2knN
)}
for n = 0, 1, . . . , c.
Frame # 27 Slide # 46 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Computation of Impulse Response Contd
It can be shown that
h0(n) = h0(n) = 1N
{Pc(0) +
ck=1
2Pc(k) cos(
2knN
)}
for n = 0, 1, . . . , c. The impulse response of the required causal filter is given
byh(n) = h0(n c)
for n = 0, 1, . . . , c.
Frame # 27 Slide # 47 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Example
Band D() W () Left band edge Right band edge
1 1 1 0 1.02 0 0.4 1.25
Sampling frequency: 2
Frame # 28 Slide # 48 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Example Contd
|E(
)|
Frame # 29 Slide # 49 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Example Contd
|E(
)|
Frame # 30 Slide # 50 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Example Contd
|E(
)|
Frame # 31 Slide # 51 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Example Contd
|E(
)|
Frame # 32 Slide # 52 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Example Contd
|E(
)|
Frame # 33 Slide # 53 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Example Contd
|E(
)|
Frame # 34 Slide # 54 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Selective Step-by-Step Search
When the system of equations
1 cos 0 cos 0 cos 0 1W (0)1 cos 1 cos 1 cos 1 1W (1) 1 cos r cos r cos r (1)rW (r )
a0a1...
ac
=
D(0)D(1)
...
D(r1)D(r )
is solved, the error function |E ()| is forced to satisfy therelation
|E (i )| = |W (i )[D(i) Pc(i )]| = ||
Frame # 35 Slide # 55 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Selective Step-by-Step Search
When the system of equations
1 cos 0 cos 0 cos 0 1W (0)1 cos 1 cos 1 cos 1 1W (1) 1 cos r cos r cos r (1)rW (r )
a0a1...
ac
=
D(0)D(1)
...
D(r1)D(r )
is solved, the error function |E ()| is forced to satisfy therelation
|E (i )| = |W (i )[D(i) Pc(i )]| = || This relation can be satisfied in a number of ways but the
most likely possibility for the j th band is illustrated in thenext slide where Lj and Rj are the left-hand andright-hand edges, respectively.
Frame # 35 Slide # 56 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Selective Step-by-Step Search Contd
4j^
+
3j
5j
6j
+
2j
+
7j
Rj
1j
Lj
||
|E()|
Frame # 36 Slide # 57 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Selective Step-by-Step Search Contd
Because of the special nature of the error function
(a) the maxima of |E ()| can be easily found by searching inthe vicinity of the extremals;
(b) gradient information can be used to expedite the search forthe maxima of |E ()|; and
(c) the closer we get to the solution, the closer are the maximaof the error function to the extremals.
By using a selective step-by-step search, a large amount ofcomputation can be eliminated.
Frame # 37 Slide # 58 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Selective Step-by-Step Search Contd
Extra ripples can arise in the first and last bands.:
jJ(j1)J
jJ
(j1)J
0
2j
||
|E()|
||
0
(b) (c)
1j
2j(d) (e)
1j
Frame # 38 Slide # 59 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Selective Step-by-Step Search Contd
Also in interior bands:
||
|E()|
(f)
Lj Rj
jj(j1)j(g)
1j 2j 3j
2j
||
(h)
Lj Rj
(j1)j(i)
1j jj
Frame # 39 Slide # 60 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Cubic Interpolation Search Increased computational efficiency can be achieved by
using a search based on cubic interpolation.
Frame # 40 Slide # 61 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Cubic Interpolation Search Increased computational efficiency can be achieved by
using a search based on cubic interpolation. Assuming that the error function shown in the figure can be
represented by the third-order polynomial
|E ()| = M = a + b + c2 + d3where a, b, c, and d are constants then
dMd
= G = b + 2c + 3d2
Hence, the frequencies at which M has stationary pointsare given by
= 13d
[c
(c2 3bd )
]
Frame # 40 Slide # 62 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Cubic Interpolation Search Increased computational efficiency can be achieved by
using a search based on cubic interpolation. Assuming that the error function shown in the figure can be
represented by the third-order polynomial
|E ()| = M = a + b + c2 + d3where a, b, c, and d are constants then
dMd
= G = b + 2c + 3d2
Hence, the frequencies at which M has stationary pointsare given by
= 13d
[c
(c2 3bd )
] Therefore, |E ()| has a maximum if
d 2Md2
= 2c + 6d < 0 or < c3d
Frame # 40 Slide # 63 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Cubic Interpolation Search Contd
1 2 3
~ ~ ~
|E()|
Frame # 41 Slide # 64 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Cubic Interpolation Search Contd
The cubic interpolation method requires four functionevaluations per potential extremal consistently.
Frame # 42 Slide # 65 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Cubic Interpolation Search Contd
The cubic interpolation method requires four functionevaluations per potential extremal consistently.
The selective step-by-step search may require as many as8 function evaluations per potential extremal in the first twoor three iterations but as the solution is approached onlytwo or three function evaluations are required.
Frame # 42 Slide # 66 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Cubic Interpolation Search Contd
The cubic interpolation method requires four functionevaluations per potential extremal consistently.
The selective step-by-step search may require as many as8 function evaluations per potential extremal in the first twoor three iterations but as the solution is approached onlytwo or three function evaluations are required.
By using the cubic interpolation to start with and thenswitching over to the step-by-step search, an very efficientalgorithm can be constructed.
Frame # 42 Slide # 67 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Cubic Interpolation Search Contd
The cubic interpolation method requires four functionevaluations per potential extremal consistently.
The selective step-by-step search may require as many as8 function evaluations per potential extremal in the first twoor three iterations but as the solution is approached onlytwo or three function evaluations are required.
By using the cubic interpolation to start with and thenswitching over to the step-by-step search, an very efficientalgorithm can be constructed.
The decision to switch from cubic to selective can be basedon the value of the convergence parameter Q (see Step 5).
Switching from the cubic to the selective when Q isreduced below 0.65 works well.
Frame # 42 Slide # 68 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Improved Rejection Scheme for SuperfluousPotential Extremals
If an extremal does not move from one iteration to the next,then the minimum value of E (
i ) is simply , as can be
easily shown, and this happens quite often even in the firstor second iteration of the Remez algorithm.
Frame # 43 Slide # 69 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Improved Rejection Scheme for SuperfluousPotential Extremals
If an extremal does not move from one iteration to the next,then the minimum value of E (
i ) is simply , as can be
easily shown, and this happens quite often even in the firstor second iteration of the Remez algorithm.
As a consequence, rejecting potential extremals on thebasis of the individual values of E (
i ) tends to become
random and this can slow the Remez algorithm quitesignificantly particularly for multiband filters.
Frame # 43 Slide # 70 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Improved Rejection Scheme for SuperfluousPotential Extremals
If an extremal does not move from one iteration to the next,then the minimum value of E (
i ) is simply , as can be
easily shown, and this happens quite often even in the firstor second iteration of the Remez algorithm.
As a consequence, rejecting potential extremals on thebasis of the individual values of E (
i ) tends to become
random and this can slow the Remez algorithm quitesignificantly particularly for multiband filters.
An improved scheme for the rejection of superfluousextremals based the rejection on the lowest average banderror as well as the individual values of E (
i ) is described
in the next transparency.
Frame # 43 Slide # 71 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Improved Rejection Scheme Contd
Compute the average band errors
Ej = 1j
i j
|E (i )| for j = 1, 2, . . . , J
where j is the set of extremals in band j given by
j = {i : Lj i Rj }j is the number of potential extremals in band j , and J isthe number of bands.
Frame # 44 Slide # 72 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Improved Rejection Scheme Contd
Compute the average band errors
Ej = 1j
i j
|E (i )| for j = 1, 2, . . . , J
where j is the set of extremals in band j given by
j = {i : Lj i Rj }j is the number of potential extremals in band j , and J isthe number of bands.
Rank the J bands in the order of lowest average error andlet l1, l2, . . . , lJ be the ranked list obtained, i.e., l1 and lJare the bands with the lowest and highest average error,respectively.
Frame # 44 Slide # 73 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Improved Rejection Scheme Contd
Reject onei in each of bands l1, l2, . . . , lJ1, l1, l2, ...
until r superfluous i are rejected.In each case, reject the
i , other than a band edge, that
yields the lowest |E (i )| in the band.Example:
If J = 3, r = 3, and the average errors for bands 1, 2, and 3are 0.05, 0.08, and 0.02, then
i are rejected in bands 3, 1, and
3.
Note: The potential extremals are not rejected in band 2 whichis the band of highest average error.
Frame # 45 Slide # 74 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Example
Band D() W () Left band edge Right band edge
1 1 1 0 1.02 0 0.4 1.25
Sampling frequency: 2
Frame # 46 Slide # 75 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Example Contd
|E(
)|
Frame # 47 Slide # 76 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Example Contd
|E(
)|
Frame # 48 Slide # 77 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Example Contd
|E(
)|
Frame # 49 Slide # 78 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Example Contd
|E(
)|
Frame # 50 Slide # 79 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Example Contd
|E(
)|
Frame # 51 Slide # 80 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Example Contd
|E(
)|
Frame # 52 Slide # 81 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Example Contd
|E(
)|
Frame # 53 Slide # 82 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Comparisons Amount of Computation
Type of No. of Range Ave. Funct. Evals. Saving, %Filter Examples of N A B C C v B C v A
LP 45 9-101 2691 722 372 48.9 86.3HP 42 9-101 2774 710 356 49.9 87.2BP 44 21-89 2777 667 338 49.3 87.8BS 35 21-91 2720 639 336 47.4 87.6
A: Exhaustive searchB: Selective searchC: Selective plus cubic search
Frame # 54 Slide # 83 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Comparisons Robustness
Type of No. of No. FailuresFilter Examples A B C
LP 46 1 0 0HP 43 1 0 0BP 50 3 2 5BS 45 6 8 8
A: Exhaustive searchB: Selective searchC: Selective plus cubic search
Frame # 55 Slide # 84 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Prescribed Specifications
Given a filter length N, a set of passband and stopbandedges, and a ratio p/a, an FIR filter with approximatelypiecewise-constant amplitude-response specifications canbe readily designed.
Frame # 56 Slide # 85 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Prescribed Specifications
Given a filter length N, a set of passband and stopbandedges, and a ratio p/a, an FIR filter with approximatelypiecewise-constant amplitude-response specifications canbe readily designed.
While the filter obtained will have passband and stopbandedges at the correct locations and the ratio p/a will beexactly as required, the amplitudes of the passband andstopband ripples are highly unlikely to have the specifiedvalues.
Frame # 56 Slide # 86 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Prescribed Specifications
Given a filter length N, a set of passband and stopbandedges, and a ratio p/a, an FIR filter with approximatelypiecewise-constant amplitude-response specifications canbe readily designed.
While the filter obtained will have passband and stopbandedges at the correct locations and the ratio p/a will beexactly as required, the amplitudes of the passband andstopband ripples are highly unlikely to have the specifiedvalues.
An acceptable design can be obtained by predicting thevalue of N on the basis of the required specifications andthen designing filters for increasing or decreasing values ofN until the lowest value of N that satisfies thespecifications is found.
Frame # 56 Slide # 87 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Filter Length Prediction
A reasonably accurate empirical formula for the predictionof the required filter length, N, for the case of lowpass andhighpass filters, due to Herrmann, Rabiner, and Chan, is
N = int[(D FB2)
B+ 1.5
]
where
B = |a p|/2D = [0.005309(log10 p)2 + 0.07114 log10 p 0.4761] log10 a
[0.00266(log10 p)2 + 0.5941 log10 p + 0.4278]F = 0.51244(log10 p log10 a) + 11.012
Frame # 57 Slide # 88 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Filter Length Prediction
The formula of Herrmann et al. can also be used to predictthe filter length in the design of bandpass, bandstop, andmultiband filters in general.
Frame # 58 Slide # 89 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Filter Length Prediction
The formula of Herrmann et al. can also be used to predictthe filter length in the design of bandpass, bandstop, andmultiband filters in general.
In these filters, a value of N is computed for each transitionband between a passband and stopband or a stopbandand passband and the largest value of N so obtained istaken to be the predicted filter length.
Frame # 58 Slide # 90 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Algorithm
1. Compute N using the prediction formula of Herrmann etal.; if N is even, set N = N + 1.
2. Design a filter of length N using the Remez algorithm and
determine the minimum value of , say
.
(A) If
> p, then do:(a) Set N = N + 2, design a filter of length N using the Remez
algorithm, and find ;
(b) If p, then go to step 3; else, go to step 2(A)(a).
(B) If
< p, then do:(a) Set N = N 2, design a filter of length N using the Remez
algorithm, and find ;
(b) If > p, then go to step 4; else, go to step 2(B)(a).
Frame # 59 Slide # 91 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Algorithm Contd
3. If part A of the algorithm was executed, use the last set ofextremals and the corresponding value of N to obtain theimpulse response of the required filter and stop.
4. If part B of the algorithm was executed, use the last butone set of extremals and the corresponding value of N toobtain the impulse response of the required filter and stop.
Frame # 60 Slide # 92 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Example
In an application, an FIR equiripple bandstop filter is requiredwhich should satisfy the following specifications:
Odd filter length
Maximum passband ripple Ap : 0.5 dB Minimum stopband attenuation Aa : 50.0 dB Lower passband edge p1 : 0.8 rad/s Upper passband edge p2 : 2.2 rad/s Lower stopband edge a1 : 1.2 rad/s Upper stopband edge a2 : 1.8 rad/s Sampling frequency s : 2 rad/s
Design the lowest-order filter that will satisfy the specifications.
Frame # 61 Slide # 93 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Example Contd
The design algorithm gave a filter with the followingspecifications:
Passband ripple: 0.4342 dB Minimum stopband attenuation: 51.23 dB
Progress of AlgorithmN Iters. FEs Ap , dB Aa , dB31 10 582 0.5055 49.9133 7 376 0.5037 49.9435 9 545 0.4342 51.23
Frame # 62 Slide # 94 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Example Contd
0.785 0 1.571 2.356 3.142
55.0
30.0
5.0
20.0
, rad/s
Gai
n, d
B
80.0
Note: Passband errors multiplied by a factor of 40.
Frame # 63 Slide # 95 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
D-Filter
A DSP software package that incorporates the designtechniques described in this presentation is D-Filter. Please see
http://www.d-filter.ece.uvic.ca
for more information.
Frame # 64 Slide # 96 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Summary
Three design techniques that bring about substantialimprovements in the efficiency of the Remez algorithmhave been described:
A step-by-step exhaustive search
A cubic interpolation search
An improved scheme for the rejection of superfluouspotential extremals
Frame # 65 Slide # 97 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Summary
Three design techniques that bring about substantialimprovements in the efficiency of the Remez algorithmhave been described:
A step-by-step exhaustive search
A cubic interpolation search
An improved scheme for the rejection of superfluouspotential extremals
These techniques are implemented in a DSP softwarepackage known as D-Filter.
Frame # 65 Slide # 98 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Summary
Three design techniques that bring about substantialimprovements in the efficiency of the Remez algorithmhave been described:
A step-by-step exhaustive search
A cubic interpolation search
An improved scheme for the rejection of superfluouspotential extremals
These techniques are implemented in a DSP softwarepackage known as D-Filter.
Extensive experimentation has shown that the selectiveand cubic interpolation searches reduce the amount ofcomputation required by the Remez algorithm by almost90% without degrading its robustness.
Frame # 65 Slide # 99 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Summary Contd
The rejection scheme described increases the efficiencyand robustness of the Remez algorithm further but thescheme has not been compared with the original methodof McClellan, Rabiner, and Parks.
Frame # 66 Slide # 100 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Summary Contd
The rejection scheme described increases the efficiencyand robustness of the Remez algorithm further but thescheme has not been compared with the original methodof McClellan, Rabiner, and Parks.
By using a prediction technique for the required filter lengthproposed by Herrmann, Rabiner, and Chan, filters thatsatisfy prescribed specifications can be designed.
Frame # 66 Slide # 101 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Summary Contd
The rejection scheme described increases the efficiencyand robustness of the Remez algorithm further but thescheme has not been compared with the original methodof McClellan, Rabiner, and Parks.
By using a prediction technique for the required filter lengthproposed by Herrmann, Rabiner, and Chan, filters thatsatisfy prescribed specifications can be designed.
For off-line applications, the Remez algorithm continues tobe the method of choice for the design of linear-phasefilters, multiband filters, differentiators, Hilbert transformers.
Frame # 66 Slide # 102 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
Summary Contd
Despite the improvements described, the Remez algorithmcontinues to require a large amount of computation.
For applications that need the filter to be designed on-linein real or quasi-real time, the window method is preferredalthough the filters obtained are suboptimal.
Frame # 67 Slide # 103 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
References
A. Antoniou, Digital Signal Processing: Signals, Systems,and Filters, Chap. 15, McGraw-Hill, 2005.
E. Ya. Remes, General Computational Methods forTchebycheff Approximation, Kiev, 1957 (Atomic EnergyCommission Translation 4491, pp. 185).
O. Herrmann, Design of nonrecursive digital filters withlinear phase, Electron.Lett., vol. 6, pp. 182184, May1970.
E. Hofstetter, A. Oppenheim, and J. Siegel, A newtechnique for the design of non-recursive digital Filters,5th Annual Princeton Conf. Information Sciences andSystems, pp. 6472, Mar. 1971.
T. W. Parks and J. H. McClellan, Chebyshev approximationfor nonrecursive digital filters with linear phase, IEEETrans. Circuit Theory, vol. CT-19, pp. 189194, Mar. 1972.
Frame # 68 Slide # 104 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
References Contd
T. W. Parks and J. H. McClellan, A program for the designof linear phase finite impulse response digital filters, IEEETrans. Audio Electroacoust., vol. AU-20, pp. 195199,Aug. 1972.
O. Herrmann, L. R. Rabiner, and D. S. K. Chan, Practicaldesign rules for optimum finite impulse response low-passdigital filters, Bell Syst. Tech. J., vol. 52, pp. 769799,Jul.-Aug. 1973.
L. R. Rabiner and O. Herrmann, On the design of optimumFIR low-pass filters with even impulse response duration,IEEE Trans. Audio Electroacoust., vol. AU-21,pp. 329336, Aug. 1973.
J. H. McClellan and T. W. Parks, A unified approach to thedesign of optimum FIR linear-phase digital filters, IEEETrans. Circuit Theory, vol. CT-20, pp. 697701, Nov. 1973.
Frame # 69 Slide # 105 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
References Contd
J. H. McClellan, T. W. Parks, and L. R. Rabiner, Acomputer program for designing optimum FIR linear phasedigital filters, IEEE Trans. Audio Electroacoust.,vol. AU-21, pp. 506526, Dec. 1973.
L. R. Rabiner, J. H. McClellan, and T. W. Parks, FIR digitalfilter design techniques using weighted Chebyshevapproximation, Proc. IEEE, vol. 63, pp. 595610,Apr. 1975.
J. H. McClellan, T. W. Parks, and L. R. Rabiner, FIR linearphase filter design program, Programs for digital signalprocessing, IEEE Press, New York, pp. 5.1-15.1-13, 1979.
A. Antoniou, Accelerated procedure for the design ofequiripple nonrecursive digital Filters, IEE Proc., vol. 129,pt. G, pp. 110, Feb. 1982 (see IEE Proc., vol. 129, pt. G,p. 107, Jun. 1982 for errata).
Frame # 70 Slide # 106 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
References Contd
A. Antoniou, New improved method for the design ofweighted-Chebyshev, nonrecursive, digital filters, IEEETrans. Circuits Syst., vol. CAS-30, pp. 740750, Oct. 1983.
D. J. Shpak and A. Antoniou, A generalized Remzmethod for the design of FIR digital filters, IEEE Trans.Circuits Syst., vol. CAS-37, pp. 161174, Feb. 1990.
Frame # 71 Slide # 107 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method
-
This slide concludes the presentation.Thank you for your attention.
Frame # 72 Slide # 108 A. Antoniou Part 2: FIR Filters Weighted-Chebyshev Method