<< Chapter < Page Chapter >> Page >

Because the filter h ( n ) is of length-N and symmetric, the error equation [link] can be split into two sums

q = n = - M M | h ^ ( n ) - h ^ d ( n ) | 2 + 2 n = M + 1 ( L - 1 ) / 2 | h ^ d ( n ) | 2

where h ^ ( n ) and h ^ d ( n ) are the inverse DTFTs of A k and A d k respectively, which means they are the h ( n ) and h d ( n ) shifted to be symmetic about n = 0 . This requires the number of frequency samples L must be odd.

[link] clearly shows that to minimize q , the N values of h ( n ) are chosen to be equal to the equivalent N values of h d ( n ) making the first sum equal zero. In other words, h ( n ) is obtained by symmetrically truncating h d ( n ) . The residual error is then given by the second summation above. An examination of the residual error as a functionof N may aid in the choice of the filter length N .

For the Type 1 linear-phase FIR filter (described in the section Four Types of Linear-Phase FIR Filters ) which has an odd length N and an even-symmetric impulse response, the L equally spaced samples of the frequency response from Equation ? from Fir Digital Filters gives

A k = n = 0 M - 1 2 h ( n ) cos ( 2 π ( M - n ) k / L ) + h ( M )

for k = 0 , 1 , 2 , . . . . , L - 1 , where M = ( N - 1 ) / 2 . This formula was derived as a special case of the DFT applied to the Type 1real, even-symmetric FIR filter coefficients to calculate the sampled amplitude of the frequency response (perhaps better posed using a ( n ) ). It was noted in the section Frequency Sampling Filter Design by Formulas that it is also a cosine transform and it can be shown that this transformation is orthogonal over theindependent values of A k , just as the DFT is.

The desired ideal amplitude gives the ideal impulse response h d ( n ) from Equation 29 from FIR Digital Filters by

h d ( n ) = 1 N [ A d 0 + k = 1 M - 1 2 A d k cos ( 2 π ( n - M ) k / N ) ] .

for n = 0 , 1 , , L - 1 . This is used in [link] , and is the ideal impulse response that is truncated and shifted to givea causal, symmetric h ( n ) .

Use of the alternative equally-spaced sampling in Equation 9 from FIR Filter Design by Frequency Sampling or Interpolation , which has no sample at zero frequency, requires h d ( n ) be calculated from Equation 11 from FIR Filter Design by Frequency Sampling or Interpolation and Equation 13 from FIR Filter Design by Frequency Sampling or Interpolation . The Type 2 filters with even N are developed in a similarway and use the design formulas Equation 36 from FIR Digital Filters and Equation 37 from FIR Digital Filters . These methods are summarized by:

The filter design procedure for an odd-length Type 1 filter is to first design an odd-length-L FIRfilter by the frequency sampling method from Equation 5 from FIR Filter Design by Frequency Sampling or Interpolation or Equation 11 from FIR Filter Design by Frequency Sampling or Interpolation or the IDFT, then to symmetrically truncate it to the desired odd-length Nand shift it to make h ( n ) causal. To design an even-length Type 2 filter , startwith an even-length-L frequency-sampling design from Equation 7 from FIR Filter Design by Frequency Sampling or Interpolation or Equation 13 from FIR Filter Design by Frequency Sampling or Interpolation or the IDFT and symmetrically truncate and shift. The resulting length-N FIR filters areoptimal LS-error approximations to the desired frequency response over the L frequency samples.

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Digital signal processing and digital filter design (draft). OpenStax CNX. Nov 17, 2012 Download for free at http://cnx.org/content/col10598/1.6
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Digital signal processing and digital filter design (draft)' conversation and receive update notifications?

Ask