<< Chapter < Page Chapter >> Page >

This approach can also be applied to the general arbitrary phase FIR filter design problem.

Weighted, unevenly sampled discrete least squared error filter design by solving simultaneous equations

It is sometimes desirable to formulate the least squared error design problem using unequally-spaced frequency samples and/or a weightingfunction on the error. This is not possible using the IDFT or derived formulas above and requires a different approach to the solution.

Samples of the amplitude response derived for N odd in Equation 2 from FIR Filter Design by Frequency Sampling or Interpolation are given by

A ( ω k ) = n = 1 M 2 h ( M - n ) cos ( ω k n ) + h ( M )

for k = 0 , 1 , , L - 1 . This relates the L frequency samples A ( ω k ) to the M+1 independent values of the symmetric length-N impulse response h(n). In the design problem where the A k are given and the values for h(n) are to be found, this represents L equations with M+1 unknowns. Because of the symmetries of A ( ω ) shown in Figure 5 from FIR Digital Filters , only half of the L values of A k are independent; however, in some cases, to have proper weights on all L samples, all must be calculated.

[link] sampled at L arbitrary frequencies can be written as a matrix equation

C a = A

where a is an M + 1 length vector with elements which are the first half of h ( n ) . C is an L by ( M + 1 ) matrix of the cosine terms from [link] , and A is a length-L vector of the frequency samples A ( ω k ) .

If the formula for the calculation of L values of the frequency response of a length-N FIR filter in [link] is used to define an error vector of differences as defined in [link] and the result is written in the matrix formulation of Equation 48 from FIR Filter Design by Frequency Sampling or Interpolation , the error becomes

C a = A = A d + e

or

C a - A d = e

where e is a vector of differences between the actual and desired samples of the frequency response. The error measure defined in [link] becomes the quadratic form

q = e T e

For L > N , equation [link] is over determined and cannot, in general, be solved for a . The filter design error measure is the norm of e , as given in [link] . This error measure is minimized by making e orthogonal to the columns of C in [link] . Multiplying both sides of [link] by the transpose of C gives

C T C a = C T A d + C T e

In order for q to be minimum, e must be orthogonal to the columns of C and, therefore, C T e must be zero. Hence, the optimal a must satisfy the “normal equations" [link] , [link] , [link] which are

C T C a = C T A d

and which can be rewritten in terms of the pseudo-inverse [link] , [link] as

a = [ C T C ] - 1 C T A d

If L = N , this becomes the regular frequency-sampling problem and can be solved with zero error. For the case of interest inthis section, where L > N , there are still only M + 1 equations to be solved. For L > > N , equation [link] may be ill-conditioned, and [link] should not be used to solve them. Special methods will be necessary to avoid serious numerical problems [link] .

If a weighted error function is desired, [link] is modified to give

q = 1 L k = 0 L - 1 W k | A ( ω k ) - A d ( ω k ) | 2

The normal equations of [link] become

C T W C a = C T W A d

where W is a positive-definite matrix of the weights. If zero weights are desired, the effect is be achieved by removing those frequencies fromthe set of L frequencies, not by using a zero value weight which would violate the vector-space conditions of a well-posed minimization problem.

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