Optimum Approximation of FIR Filters Quote of the Day There are three kinds of lies: lies, damned lies, and statistics. Benjamin Disraeli Content and Figures are from Discrete-Time Signal Processing, 2e by Oppenheim, Shafer, and Buck, ©1999-2000 Prentice Hall Inc. Optimum Filter Design • Filter design by windows is simple but not optimal – Like to design filters with minimal length • Optimality Criterion – Window design with rectangular filter is optimal in one sense • Minimizes the mean-squared approximation error to desired response • But causes large error around discontinuities h n 0 n M hn d else 0 2 1 j j Hd e H e d 2 2 – Alternative criteria can give better results • Minimax: Minimize maximum error • Frequency-weighted error • Most popular method: Parks-McClellan Algorithm – Reformulates filter design problem as function approximation Copyright (C) 2005 Güner Arslan 351M Digital Signal Processing 2 Function Approximation • Consider the design of type I FIR filter – Assume zero-phase for simplicity – Can delay by sufficient amount to make causal h ne he n he n Ae e L j e jn n L – Assume L=M/2 an integer h 0 2h ncosn Ae e j L e e n 1 • After delaying the resulting impulse response hn he n M / 2 hM n H e j A e e j e jM / 2 • Goal is to approximate a desired response with A e e j • Example approximation mask – Low-pass filter Copyright (C) 2005 Güner Arslan 351M Digital Signal Processing 3 Polynomial Approximation • Using Chebyshev polynomials cosn Tn cos where Tn x cos n cos1 x • Express the following as a sum of powers h 0 2h ncosn a cos Ae e L j e L e k n 1 k 0 • Can also be represented as Px Ae e k j x c os where Px L k a x k k 0 • Parks and McClellan fix p, s, and L – Convert filter design to an approximation problem • The approximation error is defined as E W Hd e j A e e j – – – – W() is the weighting function Hd(ej) is the desired frequency response Both defined only over the passpand and stopband Transition bands are unconstrained Copyright (C) 2005 Güner Arslan 351M Digital Signal Processing 4 Lowpass Filter Approximation • The weighting function for lowpass filter is 2 W 1 1 0 p s • This choice will force the error to = 2 in both bands • Criterion used is minmax min max E he n:0 nL F • F is the set of frequencies the approximations is made over Copyright (C) 2005 Güner Arslan 351M Digital Signal Processing 5 Alternation Theorem • Fp denote the closed subset – consisting of the disjoint union of closed subsets of the real axis x • The following is an rth order polynomial Px r a x k k k 0 • Dp(x) denotes given desired function that is continuous on Fp • Wp(x) is a positive function that is continuous on Fp • The weighted error is given as Ep x Wp x Dp x Px • The maximum error is defined as E max Ep x xFp • A necessary and sufficient condition that P(x) be the unique rth order polynomial that minimizes E is that Ep(x) exhibit at least (r+2) alternations • There must be at least (r+2) values xi in Fp such that x1<x2<…<xr+2 Ep xi Ep xi1 E for i 1,2,...,(r 2) Copyright (C) 2005 Güner Arslan 351M Digital Signal Processing 6 Example • Examine polynomials P(x) that approximate 1 for 1 x 0.1 Not alternations 0 for 0.1 x 1 • Fifth order polynomials shown • Which satisfy the theorem? Not alternations Copyright (C) 2005 Güner Arslan 351M Digital Signal Processing 7 Optimal Type I Lowpass Filters • In this case the P(x) polynomial is the cosine polynomial Pcos L ak cos k k 0 • The desired lowpass filter frequency response (x=cos) 1 cos p 1 Dp cos 0 1 cos s • The weighting function is given as 1 / K cos p 1 Wp cos 1 cos s 1 • The approximation error is given as Ep cos Wp cos Dp cos Pcos Copyright (C) 2005 Güner Arslan 351M Digital Signal Processing 8 Typical Example Lowpass Filter Approximation • 7th order approximation Copyright (C) 2005 Güner Arslan 351M Digital Signal Processing 9 Properties of Type I Lowpass Filters • Maximum possible number of alternations of the error is L+3 • Alternations will always occur at p and s • All points with zero slope inside the passpand and all points with zero slope inside the stopband will correspond to alternations – The filter will be equiripple except possibly at 0 and Copyright (C) 2005 Güner Arslan 351M Digital Signal Processing 10 Flowchart of Parks-McClellan Algorithm Copyright (C) 2005 Güner Arslan 351M Digital Signal Processing 11
© Copyright 2026 Paperzz