ECE4270 Fundamentals of DSP Lecture Chebyshev Approximation Algorithm for FIR Design J McClellan School of Electrical and Computer Engineering Center for Signal and Image Processing Georgia Institute of Technology http://users.ece.gatech.edu/mcclella/remezLec4.pdf
Overview of Lecture Read Chapter 7 (Oppenheim-Schafer 2010): 7.7 and 7.8 The Remez exchange algorithm a.k.a. “Parks-McClellan” algorithm (1972) OPTIMAL approximation of the FIR filter Chebyshev norm approximation Alternation Theorem Equiripple Frequency Response Examples of FIR filters Lowpass, Highpass, Bandpass, Differentiators Comparison to Kaiser Window Design Method
General Frequency Selective Filter Transition width is same at each discontinuity and ripple is scaled by size of discontinuity. Can be thought of as a sum and difference ideal lowpass filters.
Example with Rectangular Window
Minimize an Error Norm Find the impulse response that minimizes the approximation error Least-squares or L2 Lp L1 L-infinity Not differentiable
Approximation in Different Norms Least-squares norm produces filters with large overshoots near the transition region. Minimizes energy in the “error” Chebyshev norm produces “equiripple” filters. Also called min-max norm
Parks and McClellan, 1972 T. W. Parks and J. H. McClellan, IEEE Trans. Circuit Theory, CT-19, pp. 189-194, March, 1972.
Remez “Remez exchange algorithm” for Chebyshev approximation was developed in the mid 1930’s. Atomic Energy Commission translated his work into english; also that of many other Russian mathematicians
The Parks McClellan Algorithm Uses the Remez exchange algorithm to iteratively find the impulse response that minimizes the maximum approximation error over a set of closed intervals in the frequency-domain. Leads to equiripple approximations that are optimum in the sense of having the smallest approximation error for a given transition width. In MATLAB, the function is remez( ), or firpm()
The Alternation Theorem Weighted approximation error: Minimize the maximum error over a disjoint set of frequencies: The optimum approximation alternates between +d and -d at least L+2 times in F. The maximum number of alternations (for LPF) is L+3.
Optimum FIR Filter Count Extremal points Chebyshev norm produces “equiripple” filters. Error “alternates” between +/- maximum error Count Extremal points
Chebyshev Polynomials Sum of cosines = Polynomial
Linear Phase Type I FIR Filter Zero-phase impulse response: Frequency response: Causal version: Four Types
Weighted Approximation Error
Exchange Algorithm Duality Search for frequencies where the error alternates between +/- maximum error. These are the EXTREMAL Frequencies d is always increasing Duality
Remez (PMc-FIR) Demo http://users.ece.gatech.edu/mcclella/matlabGUIs/
Remez (PMc-FIR) Demo
Remez (PMc-FIR) Demo
Remez (PMc-FIR) Iteration
Remez (PMc-FIR) Demo
Remez FIR Design M=17, Length=18
Remez FIR Design M=18, Length=19
Remez (PMc-FIR) Bandpass Filter
A Design Example The C-T specifications are (1/T=2000 Hz): The corresponding D-T specifications are:
Design Formula Kaiser obtained the following design formula for PMc-FIR by curve fitting many examples: MATLAB example: » [M,Fo,Mo,W] = remezord( [.4,.6], [1,0], [0.01,0.001], 2 ); » [h,delta]=remez(M,Fo,Mo,W); firpm
Remez (PMc-FIR) Lowpass Design
Remez (P-Mc FIR) Differentiator Length=6, M=5 Type-IV Filter Odd symmetry RED=desired BLUE=design Hilbert Transformer also Type-III or IV with ODD symmetry
Compare Remez & Kaiser Design formula “estimate” for REMEZ Design formula for KAISER Example:
END Questions?
Comparison of Filter Structures Complexity is proportional to amount of computation and storage plus program storage and computational cycles. FIR direct form - (M+1) coefficients (M+1) multiplications, M additions (M+1) coefficients, M delays (registers) M = Filter Order IIR cascade form - Ns second-order sections. 5Ns multiplications, 5Ns additions 5Ns coefficients, 5Ns delays
Lowpass Filter Implementations Specifications of lowpass filter These specs met by the following approx. Butterworth - 12th-order Chebyshev - 8th-order Elliptic - 6th-order Kaiser window - 37 sample impulse response Parks-McClellan - 27 sample impulse response
Comparison of Lowpass Filters