<< Chapter < Page Chapter >> Page >
L = P 0 π ( A ( ω ) - A d ( ω ) ) 2 d ω + i μ i A ( ω i ) - [ A d ( ω i ) ± T ( ω i ) ]

where the μ i are the necessary number of Langrange multipliers and P is a scale factor that can be chosen for simplicity later. The first term in [link] is the integral squared error of the frequency response to be minimized and the second term will be zero when the equalityconstraints are satisfied at the frequencies, ω i . The function T ( ω ) is the constraint function in that A ( ω ) must satisfy

A d ( ω ) + T ( ω ) A ( ω ) A d ( ω ) - T ( ω ) .

Necessary conditions for the minimization of the integral squared error are that thederivative of the Lagrangian with respect to the filter parameters a ( n ) defined in Equation 49 from FIR Digital Filters and to the Lagrange multipliers μ i be zero [link] .

The derivatives of the Lagrangian with respect to a ( n ) are

d L d a ( n ) = P 0 π 2 ( A ( ω ) - A d ( ω ) ) d A d a d ω + i μ i d A d a ω i

where from Equation 49 from FIR digital Filters we have for n = 1 , 2 , , M

d A ( ω ) d a ( n ) = cos ( ω n )

and for n = 0

d A ( ω ) d a ( 0 ) = K .

For n = 1 , 2 , , M this gives

d L d a ( n ) = 2 P A ( ω ) cos ( ω n ) d ω - A d ( ω ) cos ( ω n ) d ω + i μ i cos ( ω i n )

and for n = 0 gives

d L d a ( 0 ) = 2 P K A ( ω ) d ω - A d ( ω ) d ω + i μ i K .

Using Equation 50 from FIR Digital Filters for n = 1 , 2 , , M , we have

d L d a ( n ) = π P a ( n ) - a d ( n ) + i μ i cos ( ω i n ) = 0

and for n = 0

d L d a ( 0 ) = 2 π P K 2 a ( 0 ) - a d ( 0 ) + K i μ i = 0 .

Choosing P = 1 / π gives

a ( n ) = a d ( n ) - i μ i cos ( ω i n )

and

a ( 0 ) = a d ( 0 ) - 1 2 K i μ i

Writing [link] and [link] in matrix form gives

a = a d - H μ .

where H is a matrix with elements

h ( n , i ) = cos ( ω i n )

except for the first row which is

h ( 0 , i ) = 1 2 K

because of the normalization of the a ( 0 ) term. The a d ( n ) are the cosine coefficients for the unconstrained approximation to the idealfilter which result from truncating the inverse DTFT of A d ( ω ) .

The derivative of the Lagrangian in [link] with respect to the Lagrange multipliers μ i , when set to zero, gives

A ( ω i ) = A d ( ω i ) ± T ( ω i ) = A c ( ω i )

which is simply a statement of the equality constraints.

In terms of the filter's cosine coefficients a ( n ) , from Equation 49 from FIR Digital Filters , this can be written"

A c ( ω i ) = n a ( n ) cos ( ω i n ) + K a ( 0 )

and as matrices

A c = G a

where A c is the vector of frequency response values which are the desired response plus or minus the constraints evaluated at thefrequencies in the constraint set. The frequency response must interpolate these values. The matrix G is

g ( i , n ) = cos ( ω i n )

except for the first column which is

g ( i , 0 ) = K .

Notice that if K = 1 / 2 , the first rows and columns are such that we have G T = H .

The two equations [link] and [link] that must be satisfied can be written as a single matrix equation of the form

I H G 0 a μ = a d A c

or, if K = 1 / 2 , as

I G T G 0 a μ = a d A c

which have as solutions

μ = ( G H ) - 1 ( G a d - A c ) a = a d - H μ

The filter corresponding to the cosine coefficients a ( n ) minimize the L 2 error norm subject the equality conditions in [link] .

Notice that the term in [link] of the form G a d is the frequency response of the optimal unconstrained filter evaluated at theconstraint set frequencies. Equation [link] could, therefore, be written

μ = ( G H ) - 1 ( A u - A c )

The constrained weighted least squares design of fir filters

Combining the weighted least squared error formulation with the constrained least squared error gives the general formulation of thisclass of problems.

We now modify the Lagrangian in [link] to allow a weighted squared error giving

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