Professional Documents
Culture Documents
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
Optimal FIR: 7 1 / 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
Optimal FIR: 7 2 / 11
Optimal Filters
7: Optimal FIR filters
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
H() = H(e ) =
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
P M2
M
2
h[n]ejn
Optimal FIR: 7 2 / 11
Optimal Filters
7: Optimal FIR filters
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
H() = H(e ) =
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
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
P M2
jn
P M2
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
P M2
jn
P M2
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
P M2
jn
P M2
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
P M2
jn
P M2
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
P M2
jn
P M2
M
2
h[n]e
d() =
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
P M2
jn
P M2
M
2
h[n]e
d() =
1 0 1
0 2
(
1 0 1
s() = 1
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
P M2
jn
P M2
M
2
h[n]e
d() =
1 0 1
0 2
(
1 0 1
s() = 1
2
e() = 1 when H() lies at the edge of the specification.
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
P M2
jn
P M2
M
2
h[n]e
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 (2014-5490)
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
8
6
4
2
2
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
8
6
4
2
2
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
Proof:
Assume the first maximal deviation from the line is negative as shown.
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
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.
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
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.
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
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.
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
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.
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
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.
Optimal FIR: 7 3 / 11
Chebyshev Polynomials
7: Optimal FIR filters
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
P M2
1
h[n] cos n
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
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
P M2
1
h[n] cos n
cos 2 = 2 cos2 1
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
P M2
1
h[n] cos n
cos 2 = 2 cos2 1
cos 3 = 4 cos3 3 cos
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
P M2
1
h[n] cos n
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
P M2
1
h[n] cos n
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
P M2
1
h[n] cos n
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
P M2
1
h[n] cos n
Optimal FIR: 7 4 / 11
Chebyshev Polynomials
7: Optimal FIR filters
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
h[n] cos n
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
P M2
Recurrence Relation:
M=4
1.2
1
|g|
0.8
0.6
0.4
0.2
0
0
0.5
1.5
2.5
3.5
Optimal FIR: 7 4 / 11
Chebyshev Polynomials
7: Optimal FIR filters
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
h[n] cos n
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
P M2
Recurrence Relation:
M=4
M=4
1.2
|g| (dB)
1
|g|
0.8
0.6
-5
-10
0.4
0.2
0
0
-15
0.5
1.5
2.5
3.5
0.5
1.5
2.5
Optimal FIR: 7 4 / 11
Chebyshev Polynomials
7: Optimal FIR filters
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
h[n] cos n
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
P M2
Recurrence Relation:
M=4
M=4
1.2
M=2
0
1
|g|
0.8
0.6
-5
g
|g| (dB)
0.5
-10
0.4
0
0.2
0
0
-15
0.5
1.5
2.5
3.5
0.5
1.5
2.5
-1
-0.5
0
cos()
0.5
Optimal FIR: 7 4 / 11
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
1.2
M=18
1
0.8
|H|
0.6
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
0.4
0.2
0
0
0.5
1.5
2.5
Optimal FIR: 7 5 / 11
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
1.2
M=18
1
0.8
|H|
0.6
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
0.4
0.2
0
0
0.5
1.5
2.5
Optimal FIR: 7 5 / 11
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
Algorithm
H() = h[0] + 2
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
P M2
1
1.2
M=18
1
0.8
h[n] cos n
|H|
0.6
0.4
0.2
0
0
0.5
1.5
2.5
Optimal FIR: 7 5 / 11
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
P M2
H() = h[0] + 2
= P (cos )
M=18
1
0.8
h[n] cos n
1.2
|H|
0.6
0.4
0.2
0
0
0.5
1.5
2.5
Optimal FIR: 7 5 / 11
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
P M2
H() = h[0] + 2
= P (cos )
M=18
1
0.8
h[n] cos n
1.2
|H|
0.6
0.4
0.2
0
0
0.5
1.5
2.5
= P (cos ) sin
Optimal FIR: 7 5 / 11
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
P M2
H() = h[0] + 2
= P (cos )
h[n] cos n
= P (cos ) sin
= 0 at = 0, and at most
M=18
1
0.8
0.6
0.4
0.2
1.2
|H|
M
2
0
0
0.5
1.5
2.5
Optimal FIR: 7 5 / 11
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
P M2
H() = h[0] + 2
= P (cos )
h[n] cos n
= P (cos ) sin
= 0 at = 0, and at most
0.6
0.4
0.2
M
2
M=18
0.8
1.2
|H|
0
0
0.5
1.5
2.5
M
2
Optimal FIR: 7 5 / 11
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
P M2
H() = h[0] + 2
= P (cos )
M=18
1
0.8
h[n] cos n
= P (cos ) sin
= 0 at = 0, and at most
0.6
0.4
0.2
1.2
|H|
M
2
0
0
0.5
1.5
2.5
Optimal FIR: 7 5 / 11
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
P M2
H() = h[0] + 2
= P (cos )
M=18
1
0.8
h[n] cos n
= P (cos ) sin
= 0 at = 0, and at most
0.6
0.4
0.2
1.2
|H|
M
2
0
0
0.5
1.5
2.5
1
zeros
of
P
(x).
(b) = + two band edges + M
2
Optimal FIR: 7 5 / 11
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
P M2
H() = h[0] + 2
= P (cos )
M=18
1
0.8
h[n] cos n
= P (cos ) sin
= 0 at = 0, and at most
0.6
0.4
0.2
1.2
|H|
M
2
0
0
0.5
1.5
2.5
1
zeros
of
P
(x).
(b) = + two band edges + M
2
Optimal FIR: 7 5 / 11
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
Optimal FIR: 7 6 / 11
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
M=4
Iteration 1
1.5
|g|
1
0.5
0
-0.5
0
0.5
1.5
2.5
Optimal FIR: 7 6 / 11
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
M=4
Iteration 1
1.5
|g|
1
0.5
0
-0.5
0
0.5
1.5
2.5
Optimal FIR: 7 6 / 11
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
M=4
Iteration 1
1.5
|g|
1
0.5
0
-0.5
0
0.5
1.5
2.5
Optimal FIR: 7 6 / 11
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
M=4
Iteration 1
1.5
|g|
1
0.5
0
-0.5
0
0.5
1.5
2.5
Optimal FIR: 7 6 / 11
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
M=4
Iteration 1
1.5
M=4
Iteration 2
1
|g|
|g|
1
0.5
0
0.5
-0.5
0
0.5
1.5
2.5
0.5
1.5
2.5
Optimal FIR: 7 6 / 11
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
M=4
Iteration 1
1.5
M=4
Iteration 2
1
|g|
|g|
1
0.5
0
0.5
-0.5
0
0.5
1.5
2.5
0.5
1.5
2.5
Optimal FIR: 7 6 / 11
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
M=4
Iteration 1
1.5
M=4
Iteration 2
M=4
Iteration 3
0.5
0
|g|
|g|
|g|
1
0.5
0.5
-0.5
0
0.5
1.5
2.5
0.5
1.5
2.5
0.5
1.5
2.5
Optimal FIR: 7 6 / 11
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
M=4
Iteration 1
1.5
M=4
Iteration 2
M=4
Iteration 3
0.5
0
|g|
|g|
|g|
1
0.5
0.5
-0.5
0
0.5
1.5
2.5
0.5
1.5
2.5
0.5
1.5
2.5
Optimal FIR: 7 6 / 11
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
1.5
M=4
Iteration 2
M=4
Iteration 3
0.5
0
|g|
|g|
|g|
1
0.5
0.5
-0.5
0
0.5
1.5
2.5
0.5
1.5
2.5
0.5
1.5
2.5
Optimal FIR: 7 6 / 11
Determine Polynomial
7: Optimal FIR filters
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
d(i ) = H(i ) +
(1)i
s(i )
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
Optimal FIR: 7 7 / 11
Determine Polynomial
7: Optimal FIR filters
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
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 ni +
(1)i
s(i )
Optimal FIR: 7 7 / 11
Determine Polynomial
7: Optimal FIR filters
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
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 ni +
(1)i
s(i )
Method 1:
M
Solve M
2 + 2 equations in 2 + 2 unknowns for h[n] + .
Optimal FIR: 7 7 / 11
Determine Polynomial
7: Optimal FIR filters
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
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 ni +
(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
P M2
n=1
h[n] cos ni
Optimal FIR: 7 7 / 11
Determine Polynomial
7: Optimal FIR filters
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
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 ni +
(1)i
s(i )
P M2
n=1
h[n] cos ni
Optimal FIR: 7 7 / 11
Determine Polynomial
7: Optimal FIR filters
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
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 ni +
(1)i
s(i )
P M2
n=1
h[n] cos ni
P M2 +2
i=1
i
P M2
ci h[0] + 2 n=1 h[n] cos n +
(1)i
s(i )
P M2 +2
i=1
ci d(i )
Optimal FIR: 7 7 / 11
Determine Polynomial
7: Optimal FIR filters
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
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 ni +
(1)i
s(i )
P M2
n=1
h[n] cos ni
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
Optimal FIR: 7 7 / 11
Determine Polynomial
7: Optimal FIR filters
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
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 ni +
(1)i
s(i )
P M2
n=1
h[n] cos ni
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
Optimal FIR: 7 7 / 11
Determine Polynomial
7: Optimal FIR filters
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
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 ni +
(1)i
s(i )
P M2
n=1
h[n] cos ni
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
Optimal FIR: 7 7 / 11
Determine Polynomial
7: Optimal FIR filters
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
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 ni +
(1)i
s(i )
P M2
n=1
h[n] cos ni
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 (2014-5490)
P M2 +2
i=1
H(i )
cos cos j
j6=i cos i cos j
Optimal FIR: 7 7 / 11
Determine Polynomial
7: Optimal FIR filters
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
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 ni +
(1)i
s(i )
P M2
n=1
h[n] cos ni
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
cos cos
M
2 ]
Optimal FIR: 7 7 / 11
Determine Polynomial
7: Optimal FIR filters
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
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 ni +
(1)i
s(i )
P M2
n=1
h[n] cos ni
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
cos cos
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
M=36
|H|
0.8
0.6
0.4
0.2
0
0
0.5
1.5
2.5
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
M=36
|H|
0.8
0.6
0.4
0.2
0
0
0.5
1.5
2.5
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
M=36
|H|
0.8
0.6
0.4
0.2
0
0
0.5
1.5
2.5
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
M=36
|H|
0.8
0.6
0.4
0.2
0
0
0.5
1.5
2.5
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
M=36
|H|
0.8
0.6
0.4
0.2
0
0
0.5
1.5
2.5
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=36
|H|
0.8
0.6
0.4
0.2
0
0
0.5
1.5
2.5
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
M=36
|H|
0.8
0.6
0.4
0.2
0
0
0.5
1.5
2.5
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 ,
M=36
|H|
0.8
0.6
0.4
0.2
0
0
0.5
1.5
2.5
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
M=36
|H| (dB)
|H|
0.8
0.6
0.4
-10
-15
-20
-25
0.2
0
0
M=36
-5
0.5
1.5
2.5
-30
0
0.5
1.5
2.5
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
M=36
|H| (dB)
|H|
0.8
0.6
0.4
1
0.5
-10
-15
-20
-0.5
-25
0.2
0
0
M=36
-5
0.5
1.5
2.5
-30
0
-1
0.5
1.5
2.5
-1
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
M=36
|H| (dB)
|H|
0.8
0.6
0.4
1
0.5
-10
-15
-20
-0.5
-25
0.2
0
0
M=36
-5
0.5
1.5
2.5
-30
0
-1
0.5
1.5
2.5
-1
Optimal FIR: 7 8 / 11
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
Optimal FIR: 7 9 / 11
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
Always stable ,
Optimal FIR: 7 9 / 11
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
Always stable ,
Low coefficient sensitivity ,
Optimal FIR: 7 9 / 11
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
Always stable ,
Low coefficient sensitivity ,
Optimal design method fast and robust ,
Optimal FIR: 7 9 / 11
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
Always stable ,
Low coefficient sensitivity ,
Optimal design method fast and robust ,
Normally needs higher order than an IIR filter /
dBatten
Filter order M 3.5
where is the most rapid transition
Optimal FIR: 7 9 / 11
Optimal Filters
Alternation Theorem
Chebyshev Polynomials
Maximal Error Locations
Remez Exchange
Algorithm
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
Always stable ,
Low coefficient sensitivity ,
Optimal design method fast and robust ,
Normally needs higher order than an IIR filter /
dBatten
Filter order M 3.5
where is the most rapid transition
dBatten
dBatten
fs = 3.5
fs2
Filtering complexity M fs 3.5
fs2 for a given specification in unscaled units.
Optimal FIR: 7 9 / 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 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 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 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 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 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 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 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 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 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 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 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 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 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
Determine Polynomial
Example Design
FIR Pros and Cons
Summary
MATLAB routines
Optimal FIR: 7 11 / 11