7: optimal fir filtersalternation theorem 7: optimal fir filters •optimal filters •alternation...
TRANSCRIPT
7: Optimal FIR filters
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 1 / 11
Optimal Filters
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 2 / 11
We restrict ourselves to zero-phase filters of odd length M + 1, symmetricaround h[0], i.e. h[−n] = h[n].
Optimal Filters
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 2 / 11
We restrict ourselves to zero-phase filters of odd length M + 1, symmetricaround h[0], i.e. h[−n] = h[n].
H(ω) = H(ejω) =∑
M2
−M2
h[n]e−jnω
Optimal Filters
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 2 / 11
We restrict ourselves to zero-phase filters of odd length M + 1, symmetricaround h[0], i.e. h[−n] = h[n].
H(ω) = H(ejω) =∑
M2
−M2
h[n]e−jnω= h[0] + 2∑
M2
1 h[n] cosnω
Optimal Filters
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 2 / 11
We restrict ourselves to zero-phase filters of odd length M + 1, symmetricaround h[0], i.e. h[−n] = h[n].
H(ω) = H(ejω) =∑
M2
−M2
h[n]e−jnω= h[0] + 2∑
M2
1 h[n] cosnω
H(ω) is real but not necessarily positive (unlike∣
∣H(ejω)∣
∣).
Optimal Filters
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 2 / 11
We restrict ourselves to zero-phase filters of odd length M + 1, symmetricaround h[0], i.e. h[−n] = h[n].
H(ω) = H(ejω) =∑
M2
−M2
h[n]e−jnω= h[0] + 2∑
M2
1 h[n] cosnω
H(ω) is real but not necessarily positive (unlike∣
∣H(ejω)∣
∣).
Weighted error: e(ω) = s(ω)(
H(ω)− d(ω))
where d(ω) is the target.
Optimal Filters
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 2 / 11
We restrict ourselves to zero-phase filters of odd length M + 1, symmetricaround h[0], i.e. h[−n] = h[n].
H(ω) = H(ejω) =∑
M2
−M2
h[n]e−jnω= h[0] + 2∑
M2
1 h[n] cosnω
H(ω) is real but not necessarily positive (unlike∣
∣H(ejω)∣
∣).
Weighted error: e(ω) = s(ω)(
H(ω)− d(ω))
where d(ω) is the target.Choose s(ω) to control the error variation with ω.
Optimal Filters
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 2 / 11
We restrict ourselves to zero-phase filters of odd length M + 1, symmetricaround h[0], i.e. h[−n] = h[n].
H(ω) = H(ejω) =∑
M2
−M2
h[n]e−jnω= h[0] + 2∑
M2
1 h[n] cosnω
H(ω) is real but not necessarily positive (unlike∣
∣H(ejω)∣
∣).
Weighted error: e(ω) = s(ω)(
H(ω)− d(ω))
where d(ω) is the target.Choose s(ω) to control the error variation with ω.
Example: lowpass filter
Optimal Filters
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 2 / 11
We restrict ourselves to zero-phase filters of odd length M + 1, symmetricaround h[0], i.e. h[−n] = h[n].
H(ω) = H(ejω) =∑
M2
−M2
h[n]e−jnω= h[0] + 2∑
M2
1 h[n] cosnω
H(ω) is real but not necessarily positive (unlike∣
∣H(ejω)∣
∣).
Weighted error: e(ω) = s(ω)(
H(ω)− d(ω))
where d(ω) is the target.Choose s(ω) to control the error variation with ω.
Example: lowpass filter
d(ω) =
1 0 ≤ ω ≤ ω1
0 ω2 ≤ ω ≤ π
Optimal Filters
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 2 / 11
We restrict ourselves to zero-phase filters of odd length M + 1, symmetricaround h[0], i.e. h[−n] = h[n].
H(ω) = H(ejω) =∑
M2
−M2
h[n]e−jnω= h[0] + 2∑
M2
1 h[n] cosnω
H(ω) is real but not necessarily positive (unlike∣
∣H(ejω)∣
∣).
Weighted error: e(ω) = s(ω)(
H(ω)− d(ω))
where d(ω) is the target.Choose s(ω) to control the error variation with ω.
Example: lowpass filter
d(ω) =
1 0 ≤ ω ≤ ω1
0 ω2 ≤ ω ≤ π
s(ω) =
δ−1 0 ≤ ω ≤ ω1
ǫ−1 ω2 ≤ ω ≤ π
Optimal Filters
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 2 / 11
We restrict ourselves to zero-phase filters of odd length M + 1, symmetricaround h[0], i.e. h[−n] = h[n].
H(ω) = H(ejω) =∑
M2
−M2
h[n]e−jnω= h[0] + 2∑
M2
1 h[n] cosnω
H(ω) is real but not necessarily positive (unlike∣
∣H(ejω)∣
∣).
Weighted error: e(ω) = s(ω)(
H(ω)− d(ω))
where d(ω) is the target.Choose s(ω) to control the error variation with ω.
Example: lowpass filter
d(ω) =
1 0 ≤ ω ≤ ω1
0 ω2 ≤ ω ≤ π
s(ω) =
δ−1 0 ≤ ω ≤ ω1
ǫ−1 ω2 ≤ ω ≤ π
e(ω) = ±1 when H(ω) lies at the edge of the specification.
Optimal Filters
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 2 / 11
We restrict ourselves to zero-phase filters of odd length M + 1, symmetricaround h[0], i.e. h[−n] = h[n].
H(ω) = H(ejω) =∑
M2
−M2
h[n]e−jnω= h[0] + 2∑
M2
1 h[n] cosnω
H(ω) is real but not necessarily positive (unlike∣
∣H(ejω)∣
∣).
Weighted error: e(ω) = s(ω)(
H(ω)− d(ω))
where d(ω) is the target.Choose s(ω) to control the error variation with ω.
Example: lowpass filter
d(ω) =
1 0 ≤ ω ≤ ω1
0 ω2 ≤ ω ≤ π
s(ω) =
δ−1 0 ≤ ω ≤ ω1
ǫ−1 ω2 ≤ ω ≤ π
e(ω) = ±1 when H(ω) lies at the edge of the specification.
Minimax criterion: h[n] = argminh[n] maxω |e(ω)|: minimize max error
Alternation Theorem
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 3 / 11
Want to find the best fit line: with the smallest maximal error.
2 4 6 82
4
6
8
Alternation Theorem
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 3 / 11
Want to find the best fit line: with the smallest maximal error.
Best fit line always attains themaximal error three times withalternate signs
2 4 6 82
4
6
8
Alternation Theorem
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 3 / 11
Want to find the best fit line: with the smallest maximal error.
Best fit line always attains themaximal error three times withalternate signs
2 4 6 82
4
6
8
Proof:Assume the first maximal deviation from the line is negative as shown.
Alternation Theorem
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 3 / 11
Want to find the best fit line: with the smallest maximal error.
Best fit line always attains themaximal error three times withalternate signs
2 4 6 82
4
6
8
Proof:Assume the first maximal deviation from the line is negative as shown.There must be an equally large positive deviation; or else just move the linedownwards to reduce the maximal deviation.
Alternation Theorem
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 3 / 11
Want to find the best fit line: with the smallest maximal error.
Best fit line always attains themaximal error three times withalternate signs
2 4 6 82
4
6
8
Proof:Assume the first maximal deviation from the line is negative as shown.There must be an equally large positive deviation; or else just move the linedownwards to reduce the maximal deviation.This must be followed by another maximal negative deviation; or else youcan rotate the line and reduce the deviations.
Alternation Theorem
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 3 / 11
Want to find the best fit line: with the smallest maximal error.
Best fit line always attains themaximal error three times withalternate signs
2 4 6 82
4
6
8
Proof:Assume the first maximal deviation from the line is negative as shown.There must be an equally large positive deviation; or else just move the linedownwards to reduce the maximal deviation.This must be followed by another maximal negative deviation; or else youcan rotate the line and reduce the deviations.
Alternation Theorem:A polynomial fit of degree n to a set of bounded points is minimax if andonly if it attains its maximal error at n+ 2 points with alternating signs.
Alternation Theorem
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 3 / 11
Want to find the best fit line: with the smallest maximal error.
Best fit line always attains themaximal error three times withalternate signs
2 4 6 82
4
6
8
Proof:Assume the first maximal deviation from the line is negative as shown.There must be an equally large positive deviation; or else just move the linedownwards to reduce the maximal deviation.This must be followed by another maximal negative deviation; or else youcan rotate the line and reduce the deviations.
Alternation Theorem:A polynomial fit of degree n to a set of bounded points is minimax if andonly if it attains its maximal error at n+ 2 points with alternating signs.There may be additional maximal error points.
Alternation Theorem
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 3 / 11
Want to find the best fit line: with the smallest maximal error.
Best fit line always attains themaximal error three times withalternate signs
2 4 6 82
4
6
8
Proof:Assume the first maximal deviation from the line is negative as shown.There must be an equally large positive deviation; or else just move the linedownwards to reduce the maximal deviation.This must be followed by another maximal negative deviation; or else youcan rotate the line and reduce the deviations.
Alternation Theorem:A polynomial fit of degree n to a set of bounded points is minimax if andonly if it attains its maximal error at n+ 2 points with alternating signs.There may be additional maximal error points.Fitting to a continuous function is the same as to an infinite number ofpoints.
Chebyshev Polynomials
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 4 / 11
H(ω) = H(ejω) = h[0] + 2∑
M2
1 h[n] cosnω
Chebyshev Polynomials
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 4 / 11
H(ω) = H(ejω) = h[0] + 2∑
M2
1 h[n] cosnω
But
cos 2ω = 2 cos2 ω − 1
Chebyshev Polynomials
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 4 / 11
H(ω) = H(ejω) = h[0] + 2∑
M2
1 h[n] cosnω
But
cos 2ω = 2 cos2 ω − 1cos 3ω = 4 cos3 ω − 3 cosω
Chebyshev Polynomials
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 4 / 11
H(ω) = H(ejω) = h[0] + 2∑
M2
1 h[n] cosnω
But cosnω = Tn(cosω): Chebyshev polynomial of 1st kind
cos 2ω = 2 cos2 ω − 1 = T2(cosω) T2(x) = 2x2 − 1cos 3ω = 4 cos3 ω − 3 cosω = T3(cosω) T3(x) = 4x3 − 3x
Chebyshev Polynomials
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 4 / 11
H(ω) = H(ejω) = h[0] + 2∑
M2
1 h[n] cosnω
But cosnω = Tn(cosω): Chebyshev polynomial of 1st kind
cos 2ω = 2 cos2 ω − 1 = T2(cosω) T2(x) = 2x2 − 1cos 3ω = 4 cos3 ω − 3 cosω = T3(cosω) T3(x) = 4x3 − 3x
Recurrence Relation:Tn+1(x) = 2xTn(x)− Tn−1(x) with T0(x) = 1, T1(x) = x
Chebyshev Polynomials
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 4 / 11
H(ω) = H(ejω) = h[0] + 2∑
M2
1 h[n] cosnω
But cosnω = Tn(cosω): Chebyshev polynomial of 1st kind
cos 2ω = 2 cos2 ω − 1 = T2(cosω) T2(x) = 2x2 − 1cos 3ω = 4 cos3 ω − 3 cosω = T3(cosω) T3(x) = 4x3 − 3x
Recurrence Relation:Tn+1(x) = 2xTn(x)− Tn−1(x) with T0(x) = 1, T1(x) = x
Proof: cos (nω + ω) + cos (nω − ω) = 2 cosω cosnω
Chebyshev Polynomials
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 4 / 11
H(ω) = H(ejω) = h[0] + 2∑
M2
1 h[n] cosnω
But cosnω = Tn(cosω): Chebyshev polynomial of 1st kind
cos 2ω = 2 cos2 ω − 1 = T2(cosω) T2(x) = 2x2 − 1cos 3ω = 4 cos3 ω − 3 cosω = T3(cosω) T3(x) = 4x3 − 3x
Recurrence Relation:Tn+1(x) = 2xTn(x)− Tn−1(x) with T0(x) = 1, T1(x) = x
Proof: cos (nω + ω) + cos (nω − ω) = 2 cosω cosnω
So H(ω) is an M2 order polynomial in cosω: alternation theorem applies.
Chebyshev Polynomials
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 4 / 11
H(ω) = H(ejω) = h[0] + 2∑
M2
1 h[n] cosnω
But cosnω = Tn(cosω): Chebyshev polynomial of 1st kind
cos 2ω = 2 cos2 ω − 1 = T2(cosω) T2(x) = 2x2 − 1cos 3ω = 4 cos3 ω − 3 cosω = T3(cosω) T3(x) = 4x3 − 3x
Recurrence Relation:Tn+1(x) = 2xTn(x)− Tn−1(x) with T0(x) = 1, T1(x) = x
Proof: cos (nω + ω) + cos (nω − ω) = 2 cosω cosnω
So H(ω) is an M2 order polynomial in cosω: alternation theorem applies.
Example: Symmetric lowpass filter of orderM = 4H(z) = 0.1766z2 + 0.4015z + 0.2124 + 0.4015z−1 + 0.1766z−2
Chebyshev Polynomials
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 4 / 11
H(ω) = H(ejω) = h[0] + 2∑
M2
1 h[n] cosnω
But cosnω = Tn(cosω): Chebyshev polynomial of 1st kind
cos 2ω = 2 cos2 ω − 1 = T2(cosω) T2(x) = 2x2 − 1cos 3ω = 4 cos3 ω − 3 cosω = T3(cosω) T3(x) = 4x3 − 3x
Recurrence Relation:Tn+1(x) = 2xTn(x)− Tn−1(x) with T0(x) = 1, T1(x) = x
Proof: cos (nω + ω) + cos (nω − ω) = 2 cosω cosnω
So H(ω) is an M2 order polynomial in cosω: alternation theorem applies.
Example: Symmetric lowpass filter of orderM = 4H(z) = 0.1766z2 + 0.4015z + 0.2124 + 0.4015z−1 + 0.1766z−2
Chebyshev Polynomials
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 4 / 11
H(ω) = H(ejω) = h[0] + 2∑
M2
1 h[n] cosnω
But cosnω = Tn(cosω): Chebyshev polynomial of 1st kind
cos 2ω = 2 cos2 ω − 1 = T2(cosω) T2(x) = 2x2 − 1cos 3ω = 4 cos3 ω − 3 cosω = T3(cosω) T3(x) = 4x3 − 3x
Recurrence Relation:Tn+1(x) = 2xTn(x)− Tn−1(x) with T0(x) = 1, T1(x) = x
Proof: cos (nω + ω) + cos (nω − ω) = 2 cosω cosnω
So H(ω) is an M2 order polynomial in cosω: alternation theorem applies.
Example: Symmetric lowpass filter of orderM = 4H(z) = 0.1766z2 + 0.4015z + 0.2124 + 0.4015z−1 + 0.1766z−2
Maximal Error Locations
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 5 / 11
Maximal error locations occur either at bandedges or when dH
dω= 0
0 0.5 1 1.5 2 2.5 30
0.2
0.4
0.6
0.8
1
1.2
ω
|H|
M=18
Maximal Error Locations
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 5 / 11
Maximal error locations occur either at bandedges or when dH
dω= 0
0 0.5 1 1.5 2 2.5 30
0.2
0.4
0.6
0.8
1
1.2
ω
|H|
M=18
Maximal Error Locations
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 5 / 11
Maximal error locations occur either at bandedges or when dH
dω= 0
H(ω) = h[0] + 2∑
M2
1 h[n] cosnω
0 0.5 1 1.5 2 2.5 30
0.2
0.4
0.6
0.8
1
1.2
ω
|H|
M=18
Maximal Error Locations
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 5 / 11
Maximal error locations occur either at bandedges or when dH
dω= 0
H(ω) = h[0] + 2∑
M2
1 h[n] cosnω= P (cosω)
where P (x) is a polynomial of order M2 . 0 0.5 1 1.5 2 2.5 3
0
0.2
0.4
0.6
0.8
1
1.2
ω
|H|
M=18
Maximal Error Locations
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 5 / 11
Maximal error locations occur either at bandedges or when dH
dω= 0
H(ω) = h[0] + 2∑
M2
1 h[n] cosnω= P (cosω)
where P (x) is a polynomial of order M2 . 0 0.5 1 1.5 2 2.5 3
0
0.2
0.4
0.6
0.8
1
1.2
ω
|H|
M=18
dHdω
= −P ′(cosω) sinω
Maximal Error Locations
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 5 / 11
Maximal error locations occur either at bandedges or when dH
dω= 0
H(ω) = h[0] + 2∑
M2
1 h[n] cosnω= P (cosω)
where P (x) is a polynomial of order M2 . 0 0.5 1 1.5 2 2.5 3
0
0.2
0.4
0.6
0.8
1
1.2
ω
|H|
M=18
dHdω
= −P ′(cosω) sinω
= 0 at ω = 0, π and at most M2 − 1 zeros of polynomial P ′(x).
Maximal Error Locations
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 5 / 11
Maximal error locations occur either at bandedges or when dH
dω= 0
H(ω) = h[0] + 2∑
M2
1 h[n] cosnω= P (cosω)
where P (x) is a polynomial of order M2 . 0 0.5 1 1.5 2 2.5 3
0
0.2
0.4
0.6
0.8
1
1.2
ω
|H|
M=18
dHdω
= −P ′(cosω) sinω
= 0 at ω = 0, π and at most M2 − 1 zeros of polynomial P ′(x).
∴ With two bands, we have at most M2 + 3 maximal error frequencies.
Maximal Error Locations
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 5 / 11
Maximal error locations occur either at bandedges or when dH
dω= 0
H(ω) = h[0] + 2∑
M2
1 h[n] cosnω= P (cosω)
where P (x) is a polynomial of order M2 . 0 0.5 1 1.5 2 2.5 3
0
0.2
0.4
0.6
0.8
1
1.2
ω
|H|
M=18
dHdω
= −P ′(cosω) sinω
= 0 at ω = 0, π and at most M2 − 1 zeros of polynomial P ′(x).
∴ With two bands, we have at most M2 + 3 maximal error frequencies.
We require M2 + 2 of alternating signs for the optimal fit.
Maximal Error Locations
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 5 / 11
Maximal error locations occur either at bandedges or when dH
dω= 0
H(ω) = h[0] + 2∑
M2
1 h[n] cosnω= P (cosω)
where P (x) is a polynomial of order M2 . 0 0.5 1 1.5 2 2.5 3
0
0.2
0.4
0.6
0.8
1
1.2
ω
|H|
M=18
dHdω
= −P ′(cosω) sinω
= 0 at ω = 0, π and at most M2 − 1 zeros of polynomial P ′(x).
∴ With two bands, we have at most M2 + 3 maximal error frequencies.
We require M2 + 2 of alternating signs for the optimal fit.
Only three possibilities exist (try them all):
(a) ω = 0 + two band edges + all(
M2 − 1
)
zeros of P ′(x).
(b) ω = π + two band edges + all(
M2 − 1
)
zeros of P ′(x).
Maximal Error Locations
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 5 / 11
Maximal error locations occur either at bandedges or when dH
dω= 0
H(ω) = h[0] + 2∑
M2
1 h[n] cosnω= P (cosω)
where P (x) is a polynomial of order M2 . 0 0.5 1 1.5 2 2.5 3
0
0.2
0.4
0.6
0.8
1
1.2
ω
|H|
M=18
dHdω
= −P ′(cosω) sinω
= 0 at ω = 0, π and at most M2 − 1 zeros of polynomial P ′(x).
∴ With two bands, we have at most M2 + 3 maximal error frequencies.
We require M2 + 2 of alternating signs for the optimal fit.
Only three possibilities exist (try them all):
(a) ω = 0 + two band edges + all(
M2 − 1
)
zeros of P ′(x).
(b) ω = π + two band edges + all(
M2 − 1
)
zeros of P ′(x).
(c) ω = 0 and π + two band edges +(
M2 − 2
)
zeros of P ′(x).
Remez Exchange Algorithm
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 6 / 11
1. Guess the positions of the M2 + 2 maximal error frequencies and give
alternating signs to the errors (e.g. choose evenly spaced ω).
Remez Exchange Algorithm
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 6 / 11
1. Guess the positions of the M2 + 2 maximal error frequencies and give
alternating signs to the errors (e.g. choose evenly spaced ω).
2. Determine the error magnitude, ǫ, and the M2 + 1 coefficients of
the polynomial that passes through the maximal error locations.
Remez Exchange Algorithm
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 6 / 11
1. Guess the positions of the M2 + 2 maximal error frequencies and give
alternating signs to the errors (e.g. choose evenly spaced ω).
2. Determine the error magnitude, ǫ, and the M2 + 1 coefficients of
the polynomial that passes through the maximal error locations.
3. Find the local maxima of the error function by evaluatinge(ω) = s(ω)
(
H(ω)− d(ω))
on a dense set of ω.
Remez Exchange Algorithm
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 6 / 11
1. Guess the positions of the M2 + 2 maximal error frequencies and give
alternating signs to the errors (e.g. choose evenly spaced ω).
2. Determine the error magnitude, ǫ, and the M2 + 1 coefficients of
the polynomial that passes through the maximal error locations.
3. Find the local maxima of the error function by evaluatinge(ω) = s(ω)
(
H(ω)− d(ω))
on a dense set of ω.
4. Update the maximal error frequencies to be an alternating subset ofthe local maxima + band edges + 0 and/or π.
Remez Exchange Algorithm
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 6 / 11
1. Guess the positions of the M2 + 2 maximal error frequencies and give
alternating signs to the errors (e.g. choose evenly spaced ω).
2. Determine the error magnitude, ǫ, and the M2 + 1 coefficients of
the polynomial that passes through the maximal error locations.
3. Find the local maxima of the error function by evaluatinge(ω) = s(ω)
(
H(ω)− d(ω))
on a dense set of ω.
4. Update the maximal error frequencies to be an alternating subset ofthe local maxima + band edges + 0 and/or π.
If maximum error is > ǫ, go back to step 2.
Remez Exchange Algorithm
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 6 / 11
1. Guess the positions of the M2 + 2 maximal error frequencies and give
alternating signs to the errors (e.g. choose evenly spaced ω).
2. Determine the error magnitude, ǫ, and the M2 + 1 coefficients of
the polynomial that passes through the maximal error locations.
3. Find the local maxima of the error function by evaluatinge(ω) = s(ω)
(
H(ω)− d(ω))
on a dense set of ω.
4. Update the maximal error frequencies to be an alternating subset ofthe local maxima + band edges + 0 and/or π.
If maximum error is > ǫ, go back to step 2.
Remez Exchange Algorithm
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 6 / 11
1. Guess the positions of the M2 + 2 maximal error frequencies and give
alternating signs to the errors (e.g. choose evenly spaced ω).
2. Determine the error magnitude, ǫ, and the M2 + 1 coefficients of
the polynomial that passes through the maximal error locations.
3. Find the local maxima of the error function by evaluatinge(ω) = s(ω)
(
H(ω)− d(ω))
on a dense set of ω.
4. Update the maximal error frequencies to be an alternating subset ofthe local maxima + band edges + 0 and/or π.
If maximum error is > ǫ, go back to step 2. (typically 15 iterations)
Remez Exchange Algorithm
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 6 / 11
1. Guess the positions of the M2 + 2 maximal error frequencies and give
alternating signs to the errors (e.g. choose evenly spaced ω).
2. Determine the error magnitude, ǫ, and the M2 + 1 coefficients of
the polynomial that passes through the maximal error locations.
3. Find the local maxima of the error function by evaluatinge(ω) = s(ω)
(
H(ω)− d(ω))
on a dense set of ω.
4. Update the maximal error frequencies to be an alternating subset ofthe local maxima + band edges + 0 and/or π.
If maximum error is > ǫ, go back to step 2. (typically 15 iterations)
Remez Exchange Algorithm
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 6 / 11
1. Guess the positions of the M2 + 2 maximal error frequencies and give
alternating signs to the errors (e.g. choose evenly spaced ω).
2. Determine the error magnitude, ǫ, and the M2 + 1 coefficients of
the polynomial that passes through the maximal error locations.
3. Find the local maxima of the error function by evaluatinge(ω) = s(ω)
(
H(ω)− d(ω))
on a dense set of ω.
4. Update the maximal error frequencies to be an alternating subset ofthe local maxima + band edges + 0 and/or π.
If maximum error is > ǫ, go back to step 2. (typically 15 iterations)
Remez Exchange Algorithm
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 6 / 11
1. Guess the positions of the M2 + 2 maximal error frequencies and give
alternating signs to the errors (e.g. choose evenly spaced ω).
2. Determine the error magnitude, ǫ, and the M2 + 1 coefficients of
the polynomial that passes through the maximal error locations.
3. Find the local maxima of the error function by evaluatinge(ω) = s(ω)
(
H(ω)− d(ω))
on a dense set of ω.
4. Update the maximal error frequencies to be an alternating subset ofthe local maxima + band edges + 0 and/or π.
If maximum error is > ǫ, go back to step 2. (typically 15 iterations)
5. Evaluate H(ω) on M + 1 evenly spaced ω and do an IDFT to get h[n].
Remex Step 2: Determine Polynomial
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 7 / 11
For each extremal frequency, ωi for 1 ≤ i ≤ M2 + 2
d(ωi) = H(ωi) +(−1)iǫs(ωi)
Remex Step 2: Determine Polynomial
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 7 / 11
For each extremal frequency, ωi for 1 ≤ i ≤ M2 + 2
d(ωi) = H(ωi) +(−1)iǫs(ωi)
= h[0] + 2∑
M2
n=1 h[n] cosnωi +(−1)iǫs(ωi)
Remex Step 2: Determine Polynomial
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 7 / 11
For each extremal frequency, ωi for 1 ≤ i ≤ M2 + 2
d(ωi) = H(ωi) +(−1)iǫs(ωi)
= h[0] + 2∑
M2
n=1 h[n] cosnωi +(−1)iǫs(ωi)
Method 1:Solve M
2 + 2 equations in M2 + 2 unknowns for h[n] + ǫ.
Remex Step 2: Determine Polynomial
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 7 / 11
For each extremal frequency, ωi for 1 ≤ i ≤ M2 + 2
d(ωi) = H(ωi) +(−1)iǫs(ωi)
= h[0] + 2∑
M2
n=1 h[n] cosnωi +(−1)iǫs(ωi)
Method 1:Solve M
2 + 2 equations in M2 + 2 unknowns for h[n] + ǫ.
In step 3, evaluate H(ω) = h[0] + 2∑
M2
n=1 h[n] cosnωi
Remex Step 2: Determine Polynomial
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 7 / 11
For each extremal frequency, ωi for 1 ≤ i ≤ M2 + 2
d(ωi) = H(ωi) +(−1)iǫs(ωi)
= h[0] + 2∑
M2
n=1 h[n] cosnωi +(−1)iǫs(ωi)
Method 1: (Computation time ∝ M3)Solve M
2 + 2 equations in M2 + 2 unknowns for h[n] + ǫ.
In step 3, evaluate H(ω) = h[0] + 2∑
M2
n=1 h[n] cosnωi
Remex Step 2: Determine Polynomial
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 7 / 11
For each extremal frequency, ωi for 1 ≤ i ≤ M2 + 2
d(ωi) = H(ωi) +(−1)iǫs(ωi)
= h[0] + 2∑
M2
n=1 h[n] cosnωi +(−1)iǫs(ωi)
Method 1: (Computation time ∝ M3)Solve M
2 + 2 equations in M2 + 2 unknowns for h[n] + ǫ.
In step 3, evaluate H(ω) = h[0] + 2∑
M2
n=1 h[n] cosnωi
Method 2: Don’t calculate h[n] explicitlyMultiply the ωi equation by ci =
∏
j 6=i1
cosωi−cosωjand add them:
∑
M2+2
i=1 ci
(
h[0] + 2∑
M2
n=1 h[n] cosnω + (−1)iǫs(ωi)
)
=∑
M2+2
i=1 cid(ωi)
Remex Step 2: Determine Polynomial
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 7 / 11
For each extremal frequency, ωi for 1 ≤ i ≤ M2 + 2
d(ωi) = H(ωi) +(−1)iǫs(ωi)
= h[0] + 2∑
M2
n=1 h[n] cosnωi +(−1)iǫs(ωi)
Method 1: (Computation time ∝ M3)Solve M
2 + 2 equations in M2 + 2 unknowns for h[n] + ǫ.
In step 3, evaluate H(ω) = h[0] + 2∑
M2
n=1 h[n] cosnωi
Method 2: Don’t calculate h[n] explicitlyMultiply the ωi equation by ci =
∏
j 6=i1
cosωi−cosωjand add them:
∑
M2+2
i=1 ci
(
h[0] + 2∑
M2
n=1 h[n] cosnω + (−1)iǫs(ωi)
)
=∑
M2+2
i=1 cid(ωi)
All terms involving h[n] sum to zero leaving∑
M2+2
i=1(−1)icis(ωi)
ǫ =∑
M2+2
i=1 cid(ωi)
Remex Step 2: Determine Polynomial
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 7 / 11
For each extremal frequency, ωi for 1 ≤ i ≤ M2 + 2
d(ωi) = H(ωi) +(−1)iǫs(ωi)
= h[0] + 2∑
M2
n=1 h[n] cosnωi +(−1)iǫs(ωi)
Method 1: (Computation time ∝ M3)Solve M
2 + 2 equations in M2 + 2 unknowns for h[n] + ǫ.
In step 3, evaluate H(ω) = h[0] + 2∑
M2
n=1 h[n] cosnωi
Method 2: Don’t calculate h[n] explicitlyMultiply the ωi equation by ci =
∏
j 6=i1
cosωi−cosωjand add them:
∑
M2+2
i=1 ci
(
h[0] + 2∑
M2
n=1 h[n] cosnω + (−1)iǫs(ωi)
)
=∑
M2+2
i=1 cid(ωi)
All terms involving h[n] sum to zero leaving∑
M2+2
i=1(−1)icis(ωi)
ǫ =∑
M2+2
i=1 cid(ωi)
Solve for ǫ
Remex Step 2: Determine Polynomial
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 7 / 11
For each extremal frequency, ωi for 1 ≤ i ≤ M2 + 2
d(ωi) = H(ωi) +(−1)iǫs(ωi)
= h[0] + 2∑
M2
n=1 h[n] cosnωi +(−1)iǫs(ωi)
Method 1: (Computation time ∝ M3)Solve M
2 + 2 equations in M2 + 2 unknowns for h[n] + ǫ.
In step 3, evaluate H(ω) = h[0] + 2∑
M2
n=1 h[n] cosnωi
Method 2: Don’t calculate h[n] explicitlyMultiply the ωi equation by ci =
∏
j 6=i1
cosωi−cosωjand add them:
∑
M2+2
i=1 ci
(
h[0] + 2∑
M2
n=1 h[n] cosnω + (−1)iǫs(ωi)
)
=∑
M2+2
i=1 cid(ωi)
All terms involving h[n] sum to zero leaving∑
M2+2
i=1(−1)icis(ωi)
ǫ =∑
M2+2
i=1 cid(ωi)
Solve for ǫ then calculate the H(ωi)
Remex Step 2: Determine Polynomial
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 7 / 11
For each extremal frequency, ωi for 1 ≤ i ≤ M2 + 2
d(ωi) = H(ωi) +(−1)iǫs(ωi)
= h[0] + 2∑
M2
n=1 h[n] cosnωi +(−1)iǫs(ωi)
Method 1: (Computation time ∝ M3)Solve M
2 + 2 equations in M2 + 2 unknowns for h[n] + ǫ.
In step 3, evaluate H(ω) = h[0] + 2∑
M2
n=1 h[n] cosnωi
Method 2: Don’t calculate h[n] explicitlyMultiply the ωi equation by ci =
∏
j 6=i1
cosωi−cosωjand add them:
∑
M2+2
i=1 ci
(
h[0] + 2∑
M2
n=1 h[n] cosnω + (−1)iǫs(ωi)
)
=∑
M2+2
i=1 cid(ωi)
All terms involving h[n] sum to zero leaving∑
M2+2
i=1(−1)icis(ωi)
ǫ =∑
M2+2
i=1 cid(ωi)
Solve for ǫ then calculate the H(ωi) then use Lagrange interpolation:
H(ω) = P (cosω) =∑
M2+2
i=1 H(ωi)∏
j 6=i
cosω−cosωj
cosωi−cosωj
Remex Step 2: Determine Polynomial
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 7 / 11
For each extremal frequency, ωi for 1 ≤ i ≤ M2 + 2
d(ωi) = H(ωi) +(−1)iǫs(ωi)
= h[0] + 2∑
M2
n=1 h[n] cosnωi +(−1)iǫs(ωi)
Method 1: (Computation time ∝ M3)Solve M
2 + 2 equations in M2 + 2 unknowns for h[n] + ǫ.
In step 3, evaluate H(ω) = h[0] + 2∑
M2
n=1 h[n] cosnωi
Method 2: Don’t calculate h[n] explicitlyMultiply the ωi equation by ci =
∏
j 6=i1
cosωi−cosωjand add them:
∑
M2+2
i=1 ci
(
h[0] + 2∑
M2
n=1 h[n] cosnω + (−1)iǫs(ωi)
)
=∑
M2+2
i=1 cid(ωi)
All terms involving h[n] sum to zero leaving∑
M2+2
i=1(−1)icis(ωi)
ǫ =∑
M2+2
i=1 cid(ωi)
Solve for ǫ then calculate the H(ωi) then use Lagrange interpolation:
H(ω) = P (cosω) =∑
M2+2
i=1 H(ωi)∏
j 6=i
cosω−cosωj
cosωi−cosωj(
M2 + 1
)
-polynomial going through all the H(ωi) [actually order M2 ]
Remex Step 2: Determine Polynomial
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 7 / 11
For each extremal frequency, ωi for 1 ≤ i ≤ M2 + 2
d(ωi) = H(ωi) +(−1)iǫs(ωi)
= h[0] + 2∑
M2
n=1 h[n] cosnωi +(−1)iǫs(ωi)
Method 1: (Computation time ∝ M3)Solve M
2 + 2 equations in M2 + 2 unknowns for h[n] + ǫ.
In step 3, evaluate H(ω) = h[0] + 2∑
M2
n=1 h[n] cosnωi
Method 2: Don’t calculate h[n] explicitly (Computation time ∝ M2)Multiply the ωi equation by ci =
∏
j 6=i1
cosωi−cosωjand add them:
∑
M2+2
i=1 ci
(
h[0] + 2∑
M2
n=1 h[n] cosnω + (−1)iǫs(ωi)
)
=∑
M2+2
i=1 cid(ωi)
All terms involving h[n] sum to zero leaving∑
M2+2
i=1(−1)icis(ωi)
ǫ =∑
M2+2
i=1 cid(ωi)
Solve for ǫ then calculate the H(ωi) then use Lagrange interpolation:
H(ω) = P (cosω) =∑
M2+2
i=1 H(ωi)∏
j 6=i
cosω−cosωj
cosωi−cosωj(
M2 + 1
)
-polynomial going through all the H(ωi) [actually order M2 ]
Example Design
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 8 / 11
Filter Specifications:Bandpass ω = [0.5, 1],
0 0.5 1 1.5 2 2.5 30
0.2
0.4
0.6
0.8
1
ω
|H|
M=36
Example Design
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 8 / 11
Filter Specifications:Bandpass ω = [0.5, 1], Transition widths: ∆ω = 0.2
0 0.5 1 1.5 2 2.5 30
0.2
0.4
0.6
0.8
1
ω
|H|
M=36
Example Design
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 8 / 11
Filter Specifications:Bandpass ω = [0.5, 1], Transition widths: ∆ω = 0.2Stopband Attenuation: −25 dB and −15 dB
0 0.5 1 1.5 2 2.5 30
0.2
0.4
0.6
0.8
1
ω
|H|
M=36
Example Design
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 8 / 11
Filter Specifications:Bandpass ω = [0.5, 1], Transition widths: ∆ω = 0.2Stopband Attenuation: −25 dB and −15 dBPassband Ripple: ±0.3 dB
0 0.5 1 1.5 2 2.5 30
0.2
0.4
0.6
0.8
1
ω
|H|
M=36
Example Design
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 8 / 11
Filter Specifications:Bandpass ω = [0.5, 1], Transition widths: ∆ω = 0.2Stopband Attenuation: −25 dB and −15 dBPassband Ripple: ±0.3 dB
Determine gain tolerances for each band:−25 dB = 0.056, −0.3 dB = 1− 0.034, −15 dB = 0.178
0 0.5 1 1.5 2 2.5 30
0.2
0.4
0.6
0.8
1
ω
|H|
M=36
Example Design
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 8 / 11
Filter Specifications:Bandpass ω = [0.5, 1], Transition widths: ∆ω = 0.2Stopband Attenuation: −25 dB and −15 dBPassband Ripple: ±0.3 dB
Determine gain tolerances for each band:−25 dB = 0.056, −0.3 dB = 1− 0.034, −15 dB = 0.178
Predicted order: M = 36
0 0.5 1 1.5 2 2.5 30
0.2
0.4
0.6
0.8
1
ω
|H|
M=36
Example Design
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 8 / 11
Filter Specifications:Bandpass ω = [0.5, 1], Transition widths: ∆ω = 0.2Stopband Attenuation: −25 dB and −15 dBPassband Ripple: ±0.3 dB
Determine gain tolerances for each band:−25 dB = 0.056, −0.3 dB = 1− 0.034, −15 dB = 0.178
Predicted order: M = 36M2 + 2 extremal frequencies are distributed between the bands
0 0.5 1 1.5 2 2.5 30
0.2
0.4
0.6
0.8
1
ω
|H|
M=36
Example Design
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 8 / 11
Filter Specifications:Bandpass ω = [0.5, 1], Transition widths: ∆ω = 0.2Stopband Attenuation: −25 dB and −15 dBPassband Ripple: ±0.3 dB
Determine gain tolerances for each band:−25 dB = 0.056, −0.3 dB = 1− 0.034, −15 dB = 0.178
Predicted order: M = 36M2 + 2 extremal frequencies are distributed between the bands
Filter meets specs ,
0 0.5 1 1.5 2 2.5 30
0.2
0.4
0.6
0.8
1
ω
|H|
M=36
Example Design
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 8 / 11
Filter Specifications:Bandpass ω = [0.5, 1], Transition widths: ∆ω = 0.2Stopband Attenuation: −25 dB and −15 dBPassband Ripple: ±0.3 dB
Determine gain tolerances for each band:−25 dB = 0.056, −0.3 dB = 1− 0.034, −15 dB = 0.178
Predicted order: M = 36M2 + 2 extremal frequencies are distributed between the bands
Filter meets specs ,; clearer on a decibel scale
0 0.5 1 1.5 2 2.5 30
0.2
0.4
0.6
0.8
1
ω
|H|
M=36
0 0.5 1 1.5 2 2.5 3-30
-25
-20
-15
-10
-5
0
ω
|H| (
dB)
M=36
Example Design
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 8 / 11
Filter Specifications:Bandpass ω = [0.5, 1], Transition widths: ∆ω = 0.2Stopband Attenuation: −25 dB and −15 dBPassband Ripple: ±0.3 dB
Determine gain tolerances for each band:−25 dB = 0.056, −0.3 dB = 1− 0.034, −15 dB = 0.178
Predicted order: M = 36M2 + 2 extremal frequencies are distributed between the bands
Filter meets specs ,; clearer on a decibel scaleMost zeros are on the unit circle + three reciprocal pairs
0 0.5 1 1.5 2 2.5 30
0.2
0.4
0.6
0.8
1
ω
|H|
M=36
0 0.5 1 1.5 2 2.5 3-30
-25
-20
-15
-10
-5
0
ω
|H| (
dB)
M=36
-1 0 1 2
-1
-0.5
0
0.5
1
Example Design
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 8 / 11
Filter Specifications:Bandpass ω = [0.5, 1], Transition widths: ∆ω = 0.2Stopband Attenuation: −25 dB and −15 dBPassband Ripple: ±0.3 dB
Determine gain tolerances for each band:−25 dB = 0.056, −0.3 dB = 1− 0.034, −15 dB = 0.178
Predicted order: M = 36M2 + 2 extremal frequencies are distributed between the bands
Filter meets specs ,; clearer on a decibel scaleMost zeros are on the unit circle + three reciprocal pairs
Reciprocal pairs give a linear phase shift
0 0.5 1 1.5 2 2.5 30
0.2
0.4
0.6
0.8
1
ω
|H|
M=36
0 0.5 1 1.5 2 2.5 3-30
-25
-20
-15
-10
-5
0
ω
|H| (
dB)
M=36
-1 0 1 2
-1
-0.5
0
0.5
1
FIR Pros and Cons
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 9 / 11
• Can have linear phase no envelope distortion, all frequencies have the same delay ,
symmetric or antisymmetric: h[n] = h[−n]∀n or −h[−n]∀n antisymmetric filters have H(ej0) = H(ejπ) = 0 symmetry means you only need M
2 + 1 multiplicationsto implement the filter.
FIR Pros and Cons
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 9 / 11
• Can have linear phase no envelope distortion, all frequencies have the same delay ,
symmetric or antisymmetric: h[n] = h[−n]∀n or −h[−n]∀n antisymmetric filters have H(ej0) = H(ejπ) = 0 symmetry means you only need M
2 + 1 multiplicationsto implement the filter.
• Always stable ,
FIR Pros and Cons
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 9 / 11
• Can have linear phase no envelope distortion, all frequencies have the same delay ,
symmetric or antisymmetric: h[n] = h[−n]∀n or −h[−n]∀n antisymmetric filters have H(ej0) = H(ejπ) = 0 symmetry means you only need M
2 + 1 multiplicationsto implement the filter.
• Always stable ,
• Low coefficient sensitivity ,
FIR Pros and Cons
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 9 / 11
• Can have linear phase no envelope distortion, all frequencies have the same delay ,
symmetric or antisymmetric: h[n] = h[−n]∀n or −h[−n]∀n antisymmetric filters have H(ej0) = H(ejπ) = 0 symmetry means you only need M
2 + 1 multiplicationsto implement the filter.
• Always stable ,
• Low coefficient sensitivity ,
• Optimal design method fast and robust ,
FIR Pros and Cons
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 9 / 11
• Can have linear phase no envelope distortion, all frequencies have the same delay ,
symmetric or antisymmetric: h[n] = h[−n]∀n or −h[−n]∀n antisymmetric filters have H(ej0) = H(ejπ) = 0 symmetry means you only need M
2 + 1 multiplicationsto implement the filter.
• Always stable ,
• Low coefficient sensitivity ,
• Optimal design method fast and robust ,
• Normally needs higher order than an IIR filter /
Filter order M ≈ dBatten
3.5∆ωwhere ∆ω is the most rapid transition
FIR Pros and Cons
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 9 / 11
• Can have linear phase no envelope distortion, all frequencies have the same delay ,
symmetric or antisymmetric: h[n] = h[−n]∀n or −h[−n]∀n antisymmetric filters have H(ej0) = H(ejπ) = 0 symmetry means you only need M
2 + 1 multiplicationsto implement the filter.
• Always stable ,
• Low coefficient sensitivity ,
• Optimal design method fast and robust ,
• Normally needs higher order than an IIR filter /
Filter order M ≈ dBatten
3.5∆ωwhere ∆ω is the most rapid transition
Filtering complexity ∝ M × fs ≈dBatten
3.5∆ωfs =
dBatten
3.5∆Ω f2s
∝ f2s for a given specification in unscaled Ω units.
Summary
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 10 / 11
Optimal Filters: minimax error criterion
Summary
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 10 / 11
Optimal Filters: minimax error criterion
• use weight function, s(ω), to allow different errorsin different frequency bands
Summary
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 10 / 11
Optimal Filters: minimax error criterion
• use weight function, s(ω), to allow different errorsin different frequency bands
• symmetric filter has zeros on unit circle or in reciprocal pairs
Summary
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 10 / 11
Optimal Filters: minimax error criterion
• use weight function, s(ω), to allow different errorsin different frequency bands
• symmetric filter has zeros on unit circle or in reciprocal pairs• Response of symmetric filter is a polynomial in cosω
Summary
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 10 / 11
Optimal Filters: minimax error criterion
• use weight function, s(ω), to allow different errorsin different frequency bands
• symmetric filter has zeros on unit circle or in reciprocal pairs• Response of symmetric filter is a polynomial in cosω• Alternation Theorem: M
2 + 2 maximal errors with alternating signs
Summary
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 10 / 11
Optimal Filters: minimax error criterion
• use weight function, s(ω), to allow different errorsin different frequency bands
• symmetric filter has zeros on unit circle or in reciprocal pairs• Response of symmetric filter is a polynomial in cosω• Alternation Theorem: M
2 + 2 maximal errors with alternating signs
Remez Exchange Algorithm (also known as Parks-McLellan Algorithm)
Summary
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 10 / 11
Optimal Filters: minimax error criterion
• use weight function, s(ω), to allow different errorsin different frequency bands
• symmetric filter has zeros on unit circle or in reciprocal pairs• Response of symmetric filter is a polynomial in cosω• Alternation Theorem: M
2 + 2 maximal errors with alternating signs
Remez Exchange Algorithm (also known as Parks-McLellan Algorithm)
• multiple constant-gain bands separated by transition regions
Summary
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 10 / 11
Optimal Filters: minimax error criterion
• use weight function, s(ω), to allow different errorsin different frequency bands
• symmetric filter has zeros on unit circle or in reciprocal pairs• Response of symmetric filter is a polynomial in cosω• Alternation Theorem: M
2 + 2 maximal errors with alternating signs
Remez Exchange Algorithm (also known as Parks-McLellan Algorithm)
• multiple constant-gain bands separated by transition regions• very robust, works for filters with M > 1000
Summary
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 10 / 11
Optimal Filters: minimax error criterion
• use weight function, s(ω), to allow different errorsin different frequency bands
• symmetric filter has zeros on unit circle or in reciprocal pairs• Response of symmetric filter is a polynomial in cosω• Alternation Theorem: M
2 + 2 maximal errors with alternating signs
Remez Exchange Algorithm (also known as Parks-McLellan Algorithm)
• multiple constant-gain bands separated by transition regions• very robust, works for filters with M > 1000• Efficient: computation ∝ M2
Summary
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 10 / 11
Optimal Filters: minimax error criterion
• use weight function, s(ω), to allow different errorsin different frequency bands
• symmetric filter has zeros on unit circle or in reciprocal pairs• Response of symmetric filter is a polynomial in cosω• Alternation Theorem: M
2 + 2 maximal errors with alternating signs
Remez Exchange Algorithm (also known as Parks-McLellan Algorithm)
• multiple constant-gain bands separated by transition regions• very robust, works for filters with M > 1000• Efficient: computation ∝ M2
• can go mad in the transition regions
Summary
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 10 / 11
Optimal Filters: minimax error criterion
• use weight function, s(ω), to allow different errorsin different frequency bands
• symmetric filter has zeros on unit circle or in reciprocal pairs• Response of symmetric filter is a polynomial in cosω• Alternation Theorem: M
2 + 2 maximal errors with alternating signs
Remez Exchange Algorithm (also known as Parks-McLellan Algorithm)
• multiple constant-gain bands separated by transition regions• very robust, works for filters with M > 1000• Efficient: computation ∝ M2
• can go mad in the transition regions
Modified version works on arbitrary gain function
Summary
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 10 / 11
Optimal Filters: minimax error criterion
• use weight function, s(ω), to allow different errorsin different frequency bands
• symmetric filter has zeros on unit circle or in reciprocal pairs• Response of symmetric filter is a polynomial in cosω• Alternation Theorem: M
2 + 2 maximal errors with alternating signs
Remez Exchange Algorithm (also known as Parks-McLellan Algorithm)
• multiple constant-gain bands separated by transition regions• very robust, works for filters with M > 1000• Efficient: computation ∝ M2
• can go mad in the transition regions
Modified version works on arbitrary gain function
• Does not always converge
Summary
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 10 / 11
Optimal Filters: minimax error criterion
• use weight function, s(ω), to allow different errorsin different frequency bands
• symmetric filter has zeros on unit circle or in reciprocal pairs• Response of symmetric filter is a polynomial in cosω• Alternation Theorem: M
2 + 2 maximal errors with alternating signs
Remez Exchange Algorithm (also known as Parks-McLellan Algorithm)
• multiple constant-gain bands separated by transition regions• very robust, works for filters with M > 1000• Efficient: computation ∝ M2
• can go mad in the transition regions
Modified version works on arbitrary gain function
• Does not always converge
For further details see Mitra: 10.
MATLAB routines
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations• Remez ExchangeAlgorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2017-10122) Optimal FIR: 7 – 11 / 11
firpm optimal FIR filter designfirpmord estimate require order for firpmcfirpm arbitrary-response filter designremez [obsolete] optimal FIR filter design