7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
7: Optimal FIR filters
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 1 / 11
Optimal Filters
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
We restrict ourselves to zero-phase filters of odd length M + 1, symmetric
around h[0], i.e. h[−n] = h[n].
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 2 / 11
Optimal Filters
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
We restrict ourselves to zero-phase filters of odd length M + 1, symmetric
around h[0], i.e. h[−n] = h[n].
jω
H(ω) = H(e ) =
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2016-8681)
P M2
−M
2
h[n]e−jnω
Optimal FIR: 7 – 2 / 11
Optimal Filters
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
We restrict ourselves to zero-phase filters of odd length M + 1, symmetric
around h[0], i.e. h[−n] = h[n].
jω
H(ω) = H(e ) =
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2016-8681)
P M2
−M
2
−jnω
h[n]e
= h[0] + 2
P M2
1
h[n] cos nω
Optimal FIR: 7 – 2 / 11
Optimal Filters
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
We restrict ourselves to zero-phase filters of odd length M + 1, symmetric
around h[0], i.e. h[−n] = h[n].
jω
P M2
−jnω
P M2
= h[0] + 2 1 h[n] cos nω
jω H(ω) is real but not necessarily positive (unlike H(e ) ).
H(ω) = H(e ) =
DSP and Digital Filters (2016-8681)
−M
2
h[n]e
Optimal FIR: 7 – 2 / 11
Optimal Filters
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
We restrict ourselves to zero-phase filters of odd length M + 1, symmetric
around h[0], i.e. h[−n] = h[n].
jω
P M2
−jnω
P M2
= h[0] + 2 1 h[n] cos nω
jω H(ω) is real but not necessarily positive (unlike H(e ) ).
Weighted error: e(ω) = s(ω) H(ω) − d(ω) where d(ω) is the target.
H(ω) = H(e ) =
DSP and Digital Filters (2016-8681)
−M
2
h[n]e
Optimal FIR: 7 – 2 / 11
Optimal Filters
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
We restrict ourselves to zero-phase filters of odd length M + 1, symmetric
around h[0], i.e. h[−n] = h[n].
jω
P M2
−jnω
P M2
= h[0] + 2 1 h[n] cos nω
jω H(ω) is real but not necessarily positive (unlike H(e ) ).
Weighted error: e(ω) = s(ω) H(ω) − d(ω) where d(ω) is the target.
Choose s(ω) to control the error variation with ω .
H(ω) = H(e ) =
DSP and Digital Filters (2016-8681)
−M
2
h[n]e
Optimal FIR: 7 – 2 / 11
Optimal Filters
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
We restrict ourselves to zero-phase filters of odd length M + 1, symmetric
around h[0], i.e. h[−n] = h[n].
jω
P M2
−jnω
P M2
= h[0] + 2 1 h[n] cos nω
jω H(ω) is real but not necessarily positive (unlike H(e ) ).
Weighted error: e(ω) = s(ω) H(ω) − d(ω) where d(ω) is the target.
Choose s(ω) to control the error variation with ω .
H(ω) = H(e ) =
−M
2
h[n]e
Example: lowpass filter
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 2 / 11
Optimal Filters
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
We restrict ourselves to zero-phase filters of odd length M + 1, symmetric
around h[0], i.e. h[−n] = h[n].
jω
P M2
−jnω
P M2
= h[0] + 2 1 h[n] cos nω
jω H(ω) is real but not necessarily positive (unlike H(e ) ).
Weighted error: e(ω) = s(ω) H(ω) − d(ω) where d(ω) is the target.
Choose s(ω) to control the error variation with ω .
H(ω) = H(e ) =
−M
2
h[n]e
Example: lowpass filter
d(ω) =
DSP and Digital Filters (2016-8681)
(
1 0 ≤ ω ≤ ω1
0 ω2 ≤ ω ≤ π
Optimal FIR: 7 – 2 / 11
Optimal Filters
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
We restrict ourselves to zero-phase filters of odd length M + 1, symmetric
around h[0], i.e. h[−n] = h[n].
jω
P M2
−jnω
P M2
= h[0] + 2 1 h[n] cos nω
jω H(ω) is real but not necessarily positive (unlike H(e ) ).
Weighted error: e(ω) = s(ω) H(ω) − d(ω) where d(ω) is the target.
Choose s(ω) to control the error variation with ω .
H(ω) = H(e ) =
−M
2
h[n]e
Example: lowpass filter
d(ω) =
(
1 0 ≤ ω ≤ ω1
0 ω2 ≤ ω ≤ π
(
δ −1 0 ≤ ω ≤ ω1
s(ω) = −1
ǫ
ω2 ≤ ω ≤ π
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 2 / 11
Optimal Filters
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
We restrict ourselves to zero-phase filters of odd length M + 1, symmetric
around h[0], i.e. h[−n] = h[n].
jω
P M2
−jnω
P M2
= h[0] + 2 1 h[n] cos nω
jω H(ω) is real but not necessarily positive (unlike H(e ) ).
Weighted error: e(ω) = s(ω) H(ω) − d(ω) where d(ω) is the target.
Choose s(ω) to control the error variation with ω .
H(ω) = H(e ) =
−M
2
h[n]e
Example: lowpass filter
d(ω) =
(
1 0 ≤ ω ≤ ω1
0 ω2 ≤ ω ≤ π
(
δ −1 0 ≤ ω ≤ ω1
s(ω) = −1
ǫ
ω2 ≤ ω ≤ π
e(ω) = ±1 when H(ω) lies at the edge of the specification.
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 2 / 11
Optimal Filters
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
We restrict ourselves to zero-phase filters of odd length M + 1, symmetric
around h[0], i.e. h[−n] = h[n].
jω
P M2
−jnω
P M2
= h[0] + 2 1 h[n] cos nω
jω H(ω) is real but not necessarily positive (unlike H(e ) ).
Weighted error: e(ω) = s(ω) H(ω) − d(ω) where d(ω) is the target.
Choose s(ω) to control the error variation with ω .
H(ω) = H(e ) =
−M
2
h[n]e
Example: lowpass filter
d(ω) =
(
1 0 ≤ ω ≤ ω1
0 ω2 ≤ ω ≤ π
(
δ −1 0 ≤ ω ≤ ω1
s(ω) = −1
ǫ
ω2 ≤ ω ≤ π
e(ω) = ±1 when H(ω) lies at the edge of the specification.
Minimax criterion: h[n] = arg minh[n] maxω |e(ω)|: minimize max error
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 2 / 11
Alternation Theorem
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Want to find the best fit line: with the smallest maximal error.
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2016-8681)
8
6
4
2
2
4
6
8
Optimal FIR: 7 – 3 / 11
Alternation Theorem
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
Want to find the best fit line: with the smallest maximal error.
Best fit line always attains the
maximal error three times with
alternate signs
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2016-8681)
8
6
4
2
2
4
6
8
Optimal FIR: 7 – 3 / 11
Alternation Theorem
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
Want to find the best fit line: with the smallest maximal error.
Best fit line always attains the
maximal error three times with
alternate signs
8
6
4
2
2
4
6
8
Proof:
Assume the first maximal deviation from the line is negative as shown.
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 3 / 11
Alternation Theorem
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
Want to find the best fit line: with the smallest maximal error.
Best fit line always attains the
maximal error three times with
alternate signs
8
6
4
2
2
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 line
downwards to reduce the maximal deviation.
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 3 / 11
Alternation Theorem
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
Want to find the best fit line: with the smallest maximal error.
Best fit line always attains the
maximal error three times with
alternate signs
8
6
4
2
2
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 line
downwards to reduce the maximal deviation.
This must be followed by another maximal negative deviation; or else you
can rotate the line and reduce the deviations.
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 3 / 11
Alternation Theorem
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
Want to find the best fit line: with the smallest maximal error.
Best fit line always attains the
maximal error three times with
alternate signs
8
6
4
2
2
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 line
downwards to reduce the maximal deviation.
This must be followed by another maximal negative deviation; or else you
can rotate the line and reduce the deviations.
Alternation Theorem:
A polynomial fit of degree n to a bounded set of points is minimax if and
only if it attains its maximal error at n + 2 points with alternating signs.
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 3 / 11
Alternation Theorem
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
Want to find the best fit line: with the smallest maximal error.
Best fit line always attains the
maximal error three times with
alternate signs
8
6
4
2
2
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 line
downwards to reduce the maximal deviation.
This must be followed by another maximal negative deviation; or else you
can rotate the line and reduce the deviations.
Alternation Theorem:
A polynomial fit of degree n to a bounded set of points is minimax if and
only if it attains its maximal error at n + 2 points with alternating signs.
There may be additional maximal error points.
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 3 / 11
Alternation Theorem
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
Want to find the best fit line: with the smallest maximal error.
Best fit line always attains the
maximal error three times with
alternate signs
8
6
4
2
2
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 line
downwards to reduce the maximal deviation.
This must be followed by another maximal negative deviation; or else you
can rotate the line and reduce the deviations.
Alternation Theorem:
A polynomial fit of degree n to a bounded set of points is minimax if and
only 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 of
points.
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 3 / 11
Chebyshev Polynomials
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
jω
H(ω) = H(e ) = h[0] + 2
P M2
1
h[n] cos nω
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 4 / 11
Chebyshev Polynomials
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
jω
H(ω) = H(e ) = h[0] + 2
But
P M2
1
h[n] cos nω
cos 2ω = 2 cos2 ω − 1
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 4 / 11
Chebyshev Polynomials
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
jω
H(ω) = H(e ) = h[0] + 2
But
P M2
1
h[n] cos nω
cos 2ω = 2 cos2 ω − 1
cos 3ω = 4 cos3 ω − 3 cos ω
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 4 / 11
Chebyshev Polynomials
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
jω
H(ω) = H(e ) = h[0] + 2
P M2
1
h[n] cos nω
But cos nω = Tn (cos ω): Chebyshev polynomial of 1st kind
cos 2ω = 2 cos2 ω − 1 = T2 (cos ω)
cos 3ω = 4 cos3 ω − 3 cos ω = T3 (cos ω)
DSP and Digital Filters (2016-8681)
T2 (x) = 2x2 − 1
T3 (x) = 4x3 − 3x
Optimal FIR: 7 – 4 / 11
Chebyshev Polynomials
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
jω
H(ω) = H(e ) = h[0] + 2
P M2
1
h[n] cos nω
But cos nω = Tn (cos ω): Chebyshev polynomial of 1st kind
cos 2ω = 2 cos2 ω − 1 = T2 (cos ω)
cos 3ω = 4 cos3 ω − 3 cos ω = T3 (cos ω)
T2 (x) = 2x2 − 1
T3 (x) = 4x3 − 3x
Recurrence Relation:
Tn+1 (x) = 2xTn (x) − Tn−1 (x) with T0 (x) = 1, T1 (x) = x
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 4 / 11
Chebyshev Polynomials
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
jω
H(ω) = H(e ) = h[0] + 2
P M2
1
h[n] cos nω
But cos nω = Tn (cos ω): Chebyshev polynomial of 1st kind
cos 2ω = 2 cos2 ω − 1 = T2 (cos ω)
cos 3ω = 4 cos3 ω − 3 cos ω = T3 (cos ω)
T2 (x) = 2x2 − 1
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 ω cos nω
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 4 / 11
Chebyshev Polynomials
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
jω
H(ω) = H(e ) = h[0] + 2
P M2
1
h[n] cos nω
But cos nω = Tn (cos ω): Chebyshev polynomial of 1st kind
cos 2ω = 2 cos2 ω − 1 = T2 (cos ω)
cos 3ω = 4 cos3 ω − 3 cos ω = T3 (cos ω)
T2 (x) = 2x2 − 1
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 ω cos nω
So H(ω) is an M
2 order polynomial in cos ω : alternation theorem applies.
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 4 / 11
Chebyshev Polynomials
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
jω
H(ω) = H(e ) = h[0] + 2
P M2
1
h[n] cos nω
But cos nω = Tn (cos ω): Chebyshev polynomial of 1st kind
cos 2ω = 2 cos2 ω − 1 = T2 (cos ω)
cos 3ω = 4 cos3 ω − 3 cos ω = T3 (cos ω)
T2 (x) = 2x2 − 1
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 ω cos nω
So H(ω) is an M
2 order polynomial in cos ω : alternation theorem applies.
Example: Symmetric lowpass filter of orderM = 4
H(z) = 0.1766z 2 + 0.4015z + 0.2124 + 0.4015z −1 + 0.1766z −2
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 4 / 11
Chebyshev Polynomials
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
jω
H(ω) = H(e ) = h[0] + 2
P M2
1
h[n] cos nω
But cos nω = Tn (cos ω): Chebyshev polynomial of 1st kind
cos 2ω = 2 cos2 ω − 1 = T2 (cos ω)
cos 3ω = 4 cos3 ω − 3 cos ω = T3 (cos ω)
T2 (x) = 2x2 − 1
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 ω cos nω
So H(ω) is an M
2 order polynomial in cos ω : alternation theorem applies.
Example: Symmetric lowpass filter of orderM = 4
H(z) = 0.1766z 2 + 0.4015z + 0.2124 + 0.4015z −1 + 0.1766z −2
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 4 / 11
Chebyshev Polynomials
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
jω
H(ω) = H(e ) = h[0] + 2
P M2
1
h[n] cos nω
But cos nω = Tn (cos ω): Chebyshev polynomial of 1st kind
cos 2ω = 2 cos2 ω − 1 = T2 (cos ω)
cos 3ω = 4 cos3 ω − 3 cos ω = T3 (cos ω)
T2 (x) = 2x2 − 1
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 ω cos nω
So H(ω) is an M
2 order polynomial in cos ω : alternation theorem applies.
Example: Symmetric lowpass filter of orderM = 4
H(z) = 0.1766z 2 + 0.4015z + 0.2124 + 0.4015z −1 + 0.1766z −2
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 4 / 11
Maximal Error Locations
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Maximal error locations occur either at band
edges or when dH
dω = 0
1.2
M=18
1
0.8
|H|
7: Optimal FIR filters
0.6
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2016-8681)
0.4
0.2
0
0
0.5
1
1.5
ω
2
2.5
3
Optimal FIR: 7 – 5 / 11
Maximal Error Locations
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Maximal error locations occur either at band
edges or when dH
dω = 0
1.2
M=18
1
0.8
|H|
7: Optimal FIR filters
0.6
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2016-8681)
0.4
0.2
0
0
0.5
1
1.5
ω
2
2.5
3
Optimal FIR: 7 – 5 / 11
Maximal Error Locations
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
Maximal error locations occur either at band
edges or when dH
dω = 0
H(ω) = h[0] + 2
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2016-8681)
P M2
1
1.2
M=18
1
0.8
h[n] cos nω
|H|
7: Optimal FIR filters
0.6
0.4
0.2
0
0
0.5
1
1.5
ω
2
2.5
3
Optimal FIR: 7 – 5 / 11
Maximal Error Locations
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
Maximal error locations occur either at band
edges or when dH
dω = 0
P M2
H(ω) = h[0] + 2
= P (cos ω)
1
M=18
1
0.8
h[n] cos nω
where P (x) is a polynomial of order M
2 .
DSP and Digital Filters (2016-8681)
1.2
|H|
7: Optimal FIR filters
0.6
0.4
0.2
0
0
0.5
1
1.5
ω
2
2.5
3
Optimal FIR: 7 – 5 / 11
Maximal Error Locations
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
Maximal error locations occur either at band
edges or when dH
dω = 0
P M2
H(ω) = h[0] + 2
= P (cos ω)
1
M=18
1
0.8
h[n] cos nω
where P (x) is a polynomial of order M
2 .
dH
dω
1.2
|H|
7: Optimal FIR filters
0.6
0.4
0.2
0
0
0.5
1
1.5
ω
2
2.5
3
= −P ′ (cos ω) sin ω
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 5 / 11
Maximal Error Locations
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
Maximal error locations occur either at band
edges or when dH
dω = 0
P M2
H(ω) = h[0] + 2
= P (cos ω)
1
h[n] cos nω
= −P ′ (cos ω) sin ω
= 0 at ω = 0, π and at most
DSP and Digital Filters (2016-8681)
M=18
1
0.8
0.6
0.4
0.2
where P (x) is a polynomial of order M
2 .
dH
dω
1.2
|H|
7: Optimal FIR filters
M
2
0
0
0.5
1
1.5
ω
2
2.5
3
− 1 zeros of polynomial P ′ (x).
Optimal FIR: 7 – 5 / 11
Maximal Error Locations
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
Maximal error locations occur either at band
edges or when dH
dω = 0
P M2
H(ω) = h[0] + 2
= P (cos ω)
1
h[n] cos nω
= −P ′ (cos ω) sin ω
= 0 at ω = 0, π and at most
1
0.6
0.4
0.2
M
2
∴ With two bands, we have at most
DSP and Digital Filters (2016-8681)
M=18
0.8
where P (x) is a polynomial of order M
2 .
dH
dω
1.2
|H|
7: Optimal FIR filters
0
0
0.5
1
1.5
ω
2
2.5
3
− 1 zeros of polynomial P ′ (x).
M
2
+ 3 maximal error frequencies.
Optimal FIR: 7 – 5 / 11
Maximal Error Locations
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
Maximal error locations occur either at band
edges or when dH
dω = 0
P M2
H(ω) = h[0] + 2
= P (cos ω)
1
M=18
1
0.8
h[n] cos nω
= −P ′ (cos ω) sin ω
= 0 at ω = 0, π and at most
0.6
0.4
0.2
where P (x) is a polynomial of order M
2 .
dH
dω
1.2
|H|
7: Optimal FIR filters
M
2
0
0
0.5
1
1.5
ω
2
2.5
3
− 1 zeros of polynomial P ′ (x).
∴ With two bands, we have at most M
2 + 3 maximal error frequencies.
We require M
2 + 2 of alternating signs for the optimal fit.
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 5 / 11
Maximal Error Locations
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
Maximal error locations occur either at band
edges or when dH
dω = 0
P M2
H(ω) = h[0] + 2
= P (cos ω)
1
M=18
1
0.8
h[n] cos nω
= −P ′ (cos ω) sin ω
= 0 at ω = 0, π and at most
0.6
0.4
0.2
where P (x) is a polynomial of order M
2 .
dH
dω
1.2
|H|
7: Optimal FIR filters
M
2
0
0
0.5
1
1.5
ω
2
2.5
3
− 1 zeros of polynomial P ′ (x).
∴ With two bands, we have at most M
2 + 3 maximal error frequencies.
We require M
2 + 2 of alternating signs for the optimal fit.
Only three possibilities exist (try them all):
(a) ω = 0 + two band edges + all
(b) ω = π + two band edges + all
DSP and Digital Filters (2016-8681)
M
2
M
2
− 1 zeros of P ′ (x).
− 1 zeros of P ′ (x).
Optimal FIR: 7 – 5 / 11
Maximal Error Locations
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
Maximal error locations occur either at band
edges or when dH
dω = 0
P M2
H(ω) = h[0] + 2
= P (cos ω)
1
M=18
1
0.8
h[n] cos nω
= −P ′ (cos ω) sin ω
= 0 at ω = 0, π and at most
0.6
0.4
0.2
where P (x) is a polynomial of order M
2 .
dH
dω
1.2
|H|
7: Optimal FIR filters
M
2
0
0
0.5
1
1.5
ω
2
2.5
3
− 1 zeros of polynomial P ′ (x).
∴ With two bands, we have at most M
2 + 3 maximal error frequencies.
We require M
2 + 2 of alternating signs for the optimal fit.
Only three possibilities exist (try them all):
M
2
M
2
(a) ω = 0 + two band edges + all
− 1 zeros of P ′ (x).
− 1 zeros of P ′ (x).
(b) ω = π + two band edges + all
M
(c) ω = {0 and π} + two band edges + 2 − 2 zeros of P ′ (x).
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 5 / 11
Remez Exchange Algorithm
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
1. Guess the positions of the M
2 + 2 maximal error frequencies and give
alternating signs to the errors (e.g. choose evenly spaced ω ).
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 6 / 11
Remez Exchange Algorithm
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
1. Guess the positions of the M
2 + 2 maximal error frequencies and give
alternating signs to the errors (e.g. choose evenly spaced ω ).
2. Determine the error magnitude, ǫ, and the M
2 + 1 coefficients of
the polynomial that passes through the maximal error locations.
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 6 / 11
Remez Exchange Algorithm
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
1. Guess the positions of the M
2 + 2 maximal error frequencies and give
alternating signs to the errors (e.g. choose evenly spaced ω ).
2. Determine the error magnitude, ǫ, and the M
2 + 1 coefficients of
the polynomial that passes through the maximal error locations.
3. Find the local maxima of the error
function by evaluating
e(ω) = s(ω) H(ω) − d(ω) on a dense set of ω .
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 6 / 11
Remez Exchange Algorithm
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
1. Guess the positions of the M
2 + 2 maximal error frequencies and give
alternating signs to the errors (e.g. choose evenly spaced ω ).
2. Determine the error magnitude, ǫ, and the M
2 + 1 coefficients of
the polynomial that passes through the maximal error locations.
3. Find the local maxima of the error
function by evaluating
e(ω) = s(ω) H(ω) − d(ω) on a dense set of ω .
4. Update the maximal error frequencies to be an alternating subset of
the local maxima + band edges + {0 and/or π}.
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 6 / 11
Remez Exchange Algorithm
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
1. Guess the positions of the M
2 + 2 maximal error frequencies and give
alternating signs to the errors (e.g. choose evenly spaced ω ).
2. Determine the error magnitude, ǫ, and the M
2 + 1 coefficients of
the polynomial that passes through the maximal error locations.
3. Find the local maxima of the error
function by evaluating
e(ω) = s(ω) H(ω) − d(ω) on a dense set of ω .
4. Update the maximal error frequencies to be an alternating subset of
the local maxima + band edges + {0 and/or π}.
If maximum error is > ǫ, go back to step 2.
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 6 / 11
Remez Exchange Algorithm
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
1. Guess the positions of the M
2 + 2 maximal error frequencies and give
alternating signs to the errors (e.g. choose evenly spaced ω ).
2. Determine the error magnitude, ǫ, and the M
2 + 1 coefficients of
the polynomial that passes through the maximal error locations.
3. Find the local maxima of the error
function by evaluating
e(ω) = s(ω) H(ω) − d(ω) on a dense set of ω .
4. Update the maximal error frequencies to be an alternating subset of
the local maxima + band edges + {0 and/or π}.
If maximum error is > ǫ, go back to step 2.
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 6 / 11
Remez Exchange Algorithm
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
1. Guess the positions of the M
2 + 2 maximal error frequencies and give
alternating signs to the errors (e.g. choose evenly spaced ω ).
2. Determine the error magnitude, ǫ, and the M
2 + 1 coefficients of
the polynomial that passes through the maximal error locations.
3. Find the local maxima of the error
function by evaluating
e(ω) = s(ω) H(ω) − d(ω) on a dense set of ω .
4. Update the maximal error frequencies to be an alternating subset of
the local maxima + band edges + {0 and/or π}.
If maximum error is > ǫ, go back to step 2. (typically 15 iterations)
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 6 / 11
Remez Exchange Algorithm
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
1. Guess the positions of the M
2 + 2 maximal error frequencies and give
alternating signs to the errors (e.g. choose evenly spaced ω ).
2. Determine the error magnitude, ǫ, and the M
2 + 1 coefficients of
the polynomial that passes through the maximal error locations.
3. Find the local maxima of the error
function by evaluating
e(ω) = s(ω) H(ω) − d(ω) on a dense set of ω .
4. Update the maximal error frequencies to be an alternating subset of
the local maxima + band edges + {0 and/or π}.
If maximum error is > ǫ, go back to step 2. (typically 15 iterations)
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 6 / 11
Remez Exchange Algorithm
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
1. Guess the positions of the M
2 + 2 maximal error frequencies and give
alternating signs to the errors (e.g. choose evenly spaced ω ).
2. Determine the error magnitude, ǫ, and the M
2 + 1 coefficients of
the polynomial that passes through the maximal error locations.
3. Find the local maxima of the error
function by evaluating
e(ω) = s(ω) H(ω) − d(ω) on a dense set of ω .
4. Update the maximal error frequencies to be an alternating subset of
the local maxima + band edges + {0 and/or π}.
If maximum error is > ǫ, go back to step 2. (typically 15 iterations)
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 6 / 11
Remez Exchange Algorithm
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
1. Guess the positions of the M
2 + 2 maximal error frequencies and give
alternating signs to the errors (e.g. choose evenly spaced ω ).
2. Determine the error magnitude, ǫ, and the M
2 + 1 coefficients of
the polynomial that passes through the maximal error locations.
3. Find the local maxima of the error
function by evaluating
e(ω) = s(ω) H(ω) − d(ω) on a dense set of ω .
4. Update the maximal error frequencies to be an alternating subset of
the 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].
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 6 / 11
Remex Step 2: Determine Polynomial
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
For each extremal frequency, ωi for 1 ≤ i ≤ M
2 +2
d(ωi ) = H(ωi ) +
(−1)i ǫ
s(ωi )
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 7 / 11
Remex Step 2: Determine Polynomial
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
For each extremal frequency, ωi for 1 ≤ i ≤ M
2 +2
d(ωi ) = H(ωi ) +
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2016-8681)
(−1)i ǫ
s(ωi )
= h[0] + 2
P M2
n=1
h[n] cos nωi +
(−1)i ǫ
s(ωi )
Optimal FIR: 7 – 7 / 11
Remex Step 2: Determine Polynomial
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
For each extremal frequency, ωi for 1 ≤ i ≤ M
2 +2
d(ωi ) = H(ωi ) +
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
(−1)i ǫ
s(ωi )
= h[0] + 2
P M2
n=1
h[n] cos nωi +
(−1)i ǫ
s(ωi )
Method 1:
M
Solve M
2 + 2 equations in 2 + 2 unknowns for h[n] + ǫ.
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 7 / 11
Remex Step 2: Determine Polynomial
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
For each extremal frequency, ωi for 1 ≤ i ≤ M
2 +2
d(ωi ) = H(ωi ) +
(−1)i ǫ
s(ωi )
= h[0] + 2
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
P M2
n=1
h[n] cos nωi +
(−1)i ǫ
s(ωi )
Method 1:
M
Solve M
2 + 2 equations in 2 + 2 unknowns for h[n] + ǫ.
In step 3, evaluate H(ω) = h[0] + 2
DSP and Digital Filters (2016-8681)
P M2
n=1
h[n] cos nωi
Optimal FIR: 7 – 7 / 11
Remex Step 2: Determine Polynomial
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
For each extremal frequency, ωi for 1 ≤ i ≤ M
2 +2
d(ωi ) = H(ωi ) +
(−1)i ǫ
s(ωi )
= h[0] + 2
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
P M2
n=1
h[n] cos nωi +
(−1)i ǫ
s(ωi )
Method 1: (Computation time ∝ M 3 )
M
Solve M
2 + 2 equations in 2 + 2 unknowns for h[n] + ǫ.
In step 3, evaluate H(ω) = h[0] + 2
DSP and Digital Filters (2016-8681)
P M2
n=1
h[n] cos nωi
Optimal FIR: 7 – 7 / 11
Remex Step 2: Determine Polynomial
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
For each extremal frequency, ωi for 1 ≤ i ≤ M
2 +2
d(ωi ) = H(ωi ) +
(−1)i ǫ
s(ωi )
= h[0] + 2
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
P M2
n=1
h[n] cos nωi +
(−1)i ǫ
s(ωi )
Method 1: (Computation time ∝ M 3 )
M
Solve M
2 + 2 equations in 2 + 2 unknowns for h[n] + ǫ.
In step 3, evaluate H(ω) = h[0] + 2
P M2
n=1
h[n] cos nωi
Method 2: Don’t calculate h[n] explicitly
Q
1
Multiply equations by ci = j6=i cos ω −cos
ω and add:
P M2 +2
i=1
DSP and Digital Filters (2016-8681)
i
P M2
ci h[0] + 2 n=1 h[n] cos nω +
j
(−1)i ǫ
s(ωi )
=
P M2 +2
i=1
ci d(ωi )
Optimal FIR: 7 – 7 / 11
Remex Step 2: Determine Polynomial
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
For each extremal frequency, ωi for 1 ≤ i ≤ M
2 +2
d(ωi ) = H(ωi ) +
(−1)i ǫ
s(ωi )
= h[0] + 2
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
P M2
n=1
h[n] cos nωi +
(−1)i ǫ
s(ωi )
Method 1: (Computation time ∝ M 3 )
M
Solve M
2 + 2 equations in 2 + 2 unknowns for h[n] + ǫ.
In step 3, evaluate H(ω) = h[0] + 2
P M2
n=1
h[n] cos nωi
Method 2: Don’t calculate h[n] explicitly
Q
1
Multiply equations by ci = j6=i cos ω −cos
ω and add:
i
j
PM
P M2
(−1)i ǫ
2 +2
h[n]
cos
nω
+
c
h[0]
+
2
=
i
n=1
i=1
i=1 ci d(ωi )
s(ωi )
All terms involving h[n] sum to zero leaving
P M2 +2 (−1)i ci
P M2 +2
i=1
i=1 ci d(ωi )
s(ωi ) ǫ =
P M2 +2
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 7 / 11
Remex Step 2: Determine Polynomial
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
For each extremal frequency, ωi for 1 ≤ i ≤ M
2 +2
d(ωi ) = H(ωi ) +
(−1)i ǫ
s(ωi )
= h[0] + 2
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
P M2
n=1
h[n] cos nωi +
(−1)i ǫ
s(ωi )
Method 1: (Computation time ∝ M 3 )
M
Solve M
2 + 2 equations in 2 + 2 unknowns for h[n] + ǫ.
In step 3, evaluate H(ω) = h[0] + 2
P M2
n=1
h[n] cos nωi
Method 2: Don’t calculate h[n] explicitly
Q
1
Multiply equations by ci = j6=i cos ω −cos
ω and add:
i
j
PM
P M2
(−1)i ǫ
2 +2
h[n]
cos
nω
+
c
h[0]
+
2
=
i
n=1
i=1
i=1 ci d(ωi )
s(ωi )
All terms involving h[n] sum to zero leaving
P M2 +2 (−1)i ci
P M2 +2
i=1
i=1 ci d(ωi )
s(ωi ) ǫ =
P M2 +2
Solve for ǫ
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 7 / 11
Remex Step 2: Determine Polynomial
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
For each extremal frequency, ωi for 1 ≤ i ≤ M
2 +2
d(ωi ) = H(ωi ) +
(−1)i ǫ
s(ωi )
= h[0] + 2
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
P M2
n=1
h[n] cos nωi +
(−1)i ǫ
s(ωi )
Method 1: (Computation time ∝ M 3 )
M
Solve M
2 + 2 equations in 2 + 2 unknowns for h[n] + ǫ.
In step 3, evaluate H(ω) = h[0] + 2
P M2
n=1
h[n] cos nωi
Method 2: Don’t calculate h[n] explicitly
Q
1
Multiply equations by ci = j6=i cos ω −cos
ω and add:
i
j
PM
P M2
(−1)i ǫ
2 +2
h[n]
cos
nω
+
c
h[0]
+
2
=
i
n=1
i=1
i=1 ci d(ωi )
s(ωi )
All terms involving h[n] sum to zero leaving
P M2 +2 (−1)i ci
P M2 +2
i=1
i=1 ci d(ωi )
s(ωi ) ǫ =
P M2 +2
Solve for ǫ then calculate the H(ωi )
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 7 / 11
Remex Step 2: Determine Polynomial
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
For each extremal frequency, ωi for 1 ≤ i ≤ M
2 +2
d(ωi ) = H(ωi ) +
(−1)i ǫ
s(ωi )
= h[0] + 2
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
P M2
n=1
h[n] cos nωi +
(−1)i ǫ
s(ωi )
Method 1: (Computation time ∝ M 3 )
M
Solve M
2 + 2 equations in 2 + 2 unknowns for h[n] + ǫ.
In step 3, evaluate H(ω) = h[0] + 2
P M2
n=1
h[n] cos nωi
Method 2: Don’t calculate h[n] explicitly
Q
1
Multiply equations by ci = j6=i cos ω −cos
ω and add:
i
j
PM
P M2
(−1)i ǫ
2 +2
h[n]
cos
nω
+
c
h[0]
+
2
=
i
n=1
i=1
i=1 ci d(ωi )
s(ωi )
All terms involving h[n] sum to zero leaving
P M2 +2 (−1)i ci
P M2 +2
i=1
i=1 ci d(ωi )
s(ωi ) ǫ =
P M2 +2
Solve for ǫ then calculate the H(ωi ) then use Lagrange interpolation:
H(ω) = P (cos ω) =
DSP and Digital Filters (2016-8681)
P M2 +2
i=1
H(ωi )
cos ω−cos ωj
j6=i cos ωi −cos ωj
Q
Optimal FIR: 7 – 7 / 11
Remex Step 2: Determine Polynomial
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
For each extremal frequency, ωi for 1 ≤ i ≤ M
2 +2
d(ωi ) = H(ωi ) +
(−1)i ǫ
s(ωi )
= h[0] + 2
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
P M2
n=1
h[n] cos nωi +
(−1)i ǫ
s(ωi )
Method 1: (Computation time ∝ M 3 )
M
Solve M
2 + 2 equations in 2 + 2 unknowns for h[n] + ǫ.
In step 3, evaluate H(ω) = h[0] + 2
P M2
n=1
h[n] cos nωi
Method 2: Don’t calculate h[n] explicitly
Q
1
Multiply equations by ci = j6=i cos ω −cos
ω and add:
i
j
PM
P M2
(−1)i ǫ
2 +2
h[n]
cos
nω
+
c
h[0]
+
2
=
i
n=1
i=1
i=1 ci d(ωi )
s(ωi )
All terms involving h[n] sum to zero leaving
P M2 +2 (−1)i ci
P M2 +2
i=1
i=1 ci d(ωi )
s(ωi ) ǫ =
P M2 +2
Solve for ǫ then calculate the H(ωi ) then use Lagrange interpolation:
P M2 +2
Q
cos ω−cos ω
H(ω) = P (cos ω) = i=1 H(ωi ) j6=i cos ωi −cos ωjj
M
2 + 1 -polynomial going through all the H(ωi ) [actually order
DSP and Digital Filters (2016-8681)
M
2 ]
Optimal FIR: 7 – 7 / 11
Remex Step 2: Determine Polynomial
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
For each extremal frequency, ωi for 1 ≤ i ≤ M
2 +2
d(ωi ) = H(ωi ) +
(−1)i ǫ
s(ωi )
= h[0] + 2
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
P M2
n=1
h[n] cos nωi +
(−1)i ǫ
s(ωi )
Method 1: (Computation time ∝ M 3 )
M
Solve M
2 + 2 equations in 2 + 2 unknowns for h[n] + ǫ.
In step 3, evaluate H(ω) = h[0] + 2
P M2
n=1
h[n] cos nωi
Method 2: Don’t calculate h[n] explicitly (Computation time ∝ M 2 )
Q
1
Multiply equations by ci = j6=i cos ω −cos
ω and add:
i
j
PM
P M2
(−1)i ǫ
2 +2
h[n]
cos
nω
+
c
h[0]
+
2
=
i
n=1
i=1
i=1 ci d(ωi )
s(ωi )
All terms involving h[n] sum to zero leaving
P M2 +2 (−1)i ci
P M2 +2
i=1
i=1 ci d(ωi )
s(ωi ) ǫ =
P M2 +2
Solve for ǫ then calculate the H(ωi ) then use Lagrange interpolation:
P M2 +2
Q
cos ω−cos ω
H(ω) = P (cos ω) = i=1 H(ωi ) j6=i cos ωi −cos ωjj
M
2 + 1 -polynomial going through all the H(ωi ) [actually order
DSP and Digital Filters (2016-8681)
M
2 ]
Optimal FIR: 7 – 7 / 11
Example Design
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Filter Specifications:
Bandpass ω = [0.5, 1],
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
1
M=36
|H|
0.8
0.6
0.4
0.2
0
0
DSP and Digital Filters (2016-8681)
0.5
1
1.5
ω
2
2.5
3
Optimal FIR: 7 – 8 / 11
Example Design
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Filter Specifications:
Bandpass ω = [0.5, 1], Transition widths: ∆ω = 0.2
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
1
M=36
|H|
0.8
0.6
0.4
0.2
0
0
DSP and Digital Filters (2016-8681)
0.5
1
1.5
ω
2
2.5
3
Optimal FIR: 7 – 8 / 11
Example Design
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Filter Specifications:
Bandpass ω = [0.5, 1], Transition widths: ∆ω = 0.2
Stopband Attenuation: −25 dB and −15 dB
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
1
M=36
|H|
0.8
0.6
0.4
0.2
0
0
DSP and Digital Filters (2016-8681)
0.5
1
1.5
ω
2
2.5
3
Optimal FIR: 7 – 8 / 11
Example Design
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
Filter Specifications:
Bandpass ω = [0.5, 1], Transition widths: ∆ω = 0.2
Stopband Attenuation: −25 dB and −15 dB
Passband Ripple: ±0.3 dB
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
1
M=36
|H|
0.8
0.6
0.4
0.2
0
0
DSP and Digital Filters (2016-8681)
0.5
1
1.5
ω
2
2.5
3
Optimal FIR: 7 – 8 / 11
Example Design
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
Filter Specifications:
Bandpass ω = [0.5, 1], Transition widths: ∆ω = 0.2
Stopband Attenuation: −25 dB and −15 dB
Passband Ripple: ±0.3 dB
Determine gain tolerances for each band:
−25 dB = 0.056, −0.3 dB = 1 − 0.034, −15 dB = 0.178
1
M=36
|H|
0.8
0.6
0.4
0.2
0
0
DSP and Digital Filters (2016-8681)
0.5
1
1.5
ω
2
2.5
3
Optimal FIR: 7 – 8 / 11
Example Design
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
Filter Specifications:
Bandpass ω = [0.5, 1], Transition widths: ∆ω = 0.2
Stopband Attenuation: −25 dB and −15 dB
Passband 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
1
M=36
|H|
0.8
0.6
0.4
0.2
0
0
DSP and Digital Filters (2016-8681)
0.5
1
1.5
ω
2
2.5
3
Optimal FIR: 7 – 8 / 11
Example Design
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
Filter Specifications:
Bandpass ω = [0.5, 1], Transition widths: ∆ω = 0.2
Stopband Attenuation: −25 dB and −15 dB
Passband 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
M
2 + 2 extremal frequencies are distributed between the bands
1
M=36
|H|
0.8
0.6
0.4
0.2
0
0
DSP and Digital Filters (2016-8681)
0.5
1
1.5
ω
2
2.5
3
Optimal FIR: 7 – 8 / 11
Example Design
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
Filter Specifications:
Bandpass ω = [0.5, 1], Transition widths: ∆ω = 0.2
Stopband Attenuation: −25 dB and −15 dB
Passband 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
M
2 + 2 extremal frequencies are distributed between the bands
Filter meets specs ,
1
M=36
|H|
0.8
0.6
0.4
0.2
0
0
DSP and Digital Filters (2016-8681)
0.5
1
1.5
ω
2
2.5
3
Optimal FIR: 7 – 8 / 11
Example Design
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
Filter Specifications:
Bandpass ω = [0.5, 1], Transition widths: ∆ω = 0.2
Stopband Attenuation: −25 dB and −15 dB
Passband 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
M
2 + 2 extremal frequencies are distributed between the bands
Filter meets specs ,; clearer on a decibel scale
1
0
M=36
|H| (dB)
|H|
0.8
0.6
0.4
DSP and Digital Filters (2016-8681)
-10
-15
-20
-25
0.2
0
0
M=36
-5
0.5
1
1.5
ω
2
2.5
3
-30
0
0.5
1
1.5
ω
2
2.5
3
Optimal FIR: 7 – 8 / 11
Example Design
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
Filter Specifications:
Bandpass ω = [0.5, 1], Transition widths: ∆ω = 0.2
Stopband Attenuation: −25 dB and −15 dB
Passband 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
M
2 + 2 extremal frequencies are distributed between the bands
Filter meets specs ,; clearer on a decibel scale
Most zeros are on the unit circle + three reciprocal pairs
1
0
M=36
|H| (dB)
|H|
0.8
0.6
0.4
DSP and Digital Filters (2016-8681)
1
0.5
-10
-15
0
-20
-0.5
-25
0.2
0
0
M=36
-5
0.5
1
1.5
ω
2
2.5
3
-30
0
-1
0.5
1
1.5
ω
2
2.5
3
-1
0
1
2
Optimal FIR: 7 – 8 / 11
Example Design
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
Filter Specifications:
Bandpass ω = [0.5, 1], Transition widths: ∆ω = 0.2
Stopband Attenuation: −25 dB and −15 dB
Passband 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
M
2 + 2 extremal frequencies are distributed between the bands
Filter meets specs ,; clearer on a decibel scale
Most zeros are on the unit circle + three reciprocal pairs
Reciprocal pairs give a linear phase shift
1
0
M=36
|H| (dB)
|H|
0.8
0.6
0.4
DSP and Digital Filters (2016-8681)
1
0.5
-10
-15
0
-20
-0.5
-25
0.2
0
0
M=36
-5
0.5
1
1.5
ω
2
2.5
3
-30
0
-1
0.5
1
1.5
ω
2
2.5
3
-1
0
1
2
Optimal FIR: 7 – 8 / 11
FIR Pros and Cons
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
• 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 multiplications
DSP and Digital Filters (2016-8681)
to implement the filter.
Optimal FIR: 7 – 9 / 11
FIR Pros and Cons
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
• 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 multiplications
to implement the filter.
• Always stable ,
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 9 / 11
FIR Pros and Cons
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
• 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 multiplications
to implement the filter.
• Always stable ,
• Low coefficient sensitivity ,
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 9 / 11
FIR Pros and Cons
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
• 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 multiplications
to implement the filter.
• Always stable ,
• Low coefficient sensitivity ,
• Optimal design method fast and robust ,
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 9 / 11
FIR Pros and Cons
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
• 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 multiplications
to implement the filter.
• Always stable ,
• Low coefficient sensitivity ,
• Optimal design method fast and robust ,
• Normally needs higher order than an IIR filter /
atten
◦ Filter order M ≈ dB
3.5∆ω where ∆ω is the most rapid transition
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 9 / 11
FIR Pros and Cons
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
• 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 multiplications
to implement the filter.
• Always stable ,
• Low coefficient sensitivity ,
• Optimal design method fast and robust ,
• Normally needs higher order than an IIR filter /
atten
◦ Filter order M ≈ dB
3.5∆ω where ∆ω is the most rapid transition
dBatten 2
atten
◦ Filtering complexity ∝ M × fs ≈ dB
f
=
s
3.5∆ω
3.5∆Ω fs
∝ fs2 for a given specification in unscaled Ω units.
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 9 / 11
Summary
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Optimal Filters: minimax error criterion
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 10 / 11
Summary
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Optimal Filters: minimax error criterion
• use weight function, s(ω), to allow different errors
in different frequency bands
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 10 / 11
Summary
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
Optimal Filters: minimax error criterion
• use weight function, s(ω), to allow different errors
•
DSP and Digital Filters (2016-8681)
in different frequency bands
symmetric filter has zeros on unit circle or in reciprocal pairs
Optimal FIR: 7 – 10 / 11
Summary
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
Optimal Filters: minimax error criterion
• use weight function, s(ω), to allow different errors
•
•
DSP and Digital Filters (2016-8681)
in different frequency bands
symmetric filter has zeros on unit circle or in reciprocal pairs
Response of symmetric filter is a polynomial in cos ω
Optimal FIR: 7 – 10 / 11
Summary
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
Optimal Filters: minimax error criterion
• use weight function, s(ω), to allow different errors
•
•
•
DSP and Digital Filters (2016-8681)
in 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
Optimal FIR: 7 – 10 / 11
Summary
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
Optimal Filters: minimax error criterion
• use weight function, s(ω), to allow different errors
•
•
•
in 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)
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 10 / 11
Summary
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
Optimal Filters: minimax error criterion
• use weight function, s(ω), to allow different errors
•
•
•
in 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
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 10 / 11
Summary
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
Optimal Filters: minimax error criterion
• use weight function, s(ω), to allow different errors
•
•
•
in 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
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 10 / 11
Summary
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
Optimal Filters: minimax error criterion
• use weight function, s(ω), to allow different errors
•
•
•
in 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 ∝ M 2
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 10 / 11
Summary
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
Optimal Filters: minimax error criterion
• use weight function, s(ω), to allow different errors
•
•
•
in 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)
•
•
•
•
DSP and Digital Filters (2016-8681)
multiple constant-gain bands separated by transition regions
very robust, works for filters with M > 1000
Efficient: computation ∝ M 2
can go mad in the transition regions
Optimal FIR: 7 – 10 / 11
Summary
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
Optimal Filters: minimax error criterion
• use weight function, s(ω), to allow different errors
•
•
•
in 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 ∝ M 2
can go mad in the transition regions
Modified version works on arbitrary gain function
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 10 / 11
Summary
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
Optimal Filters: minimax error criterion
• use weight function, s(ω), to allow different errors
•
•
•
in 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 ∝ M 2
can go mad in the transition regions
Modified version works on arbitrary gain function
• Does not always converge
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 10 / 11
Summary
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
Optimal Filters: minimax error criterion
• use weight function, s(ω), to allow different errors
•
•
•
in 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 ∝ M 2
can go mad in the transition regions
Modified version works on arbitrary gain function
• Does not always converge
For further details see Mitra: 10.
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 10 / 11
MATLAB routines
7: Optimal FIR filters
• Optimal Filters
• Alternation Theorem
• Chebyshev Polynomials
• Maximal Error Locations
• Remez Exchange
Algorithm
firpm
firpmord
cfirpm
remez
optimal FIR filter design
estimate require order for firpm
arbitrary-response filter design
[obsolete] optimal FIR filter design
• Determine Polynomial
• Example Design
• FIR Pros and Cons
• Summary
• MATLAB routines
DSP and Digital Filters (2016-8681)
Optimal FIR: 7 – 11 / 11
© Copyright 2026 Paperzz