Vous êtes sur la page 1sur 4

Bleking Institute of Technology Department of Telecommunications and Signal Processing Sven Nordebo, To Tran

15 September 2003

Advanced Filter Design Task 3 : FIR Filter with Linear-Phase, Minimax-Design using Linear Programming 1 Introduction

In this task we will design linear-phase FIR lters based on the minimax criteria. The optimal lter minimizes a so called max-norm. The design problem is often refereed as a (weighted) Chebyshev design. One method to solve the design problem is to use linear programming which will be described below. The amplitude function for a linear-phase FIR lter with real impulse response can be written as A() = T ()a (1) where () is a column vector containing the real basis functions and a is the corresponding coecient vector (see Task 1). Let i denote the discrete frequency grid points in the interval [0, ] for i = 1, . . . , I and Adi denote the corresponding desired amplitude specication. Let vi denote the positive frequency weights and let i = (i ). The optimal coecient vector ao which minimizes the max norm is given by A Ad = max vi |T a Adi | i
i{1,...,I}

(2)

where A and Ad are the real 1 I vectors with the elements T a and Adi i respectively. With = [1 I ] we can write A = aT . The optimal (smallest possible) max norm aT Ad is called the Chebyshev error and o ao is called the Chebyshev solution. Consider these inequalities vi |T a Adi | (a) i , i = 1, . . . , I (3)

where (a) is the smallest possible real number which fullls the inequalities in (3) for a given a. By little considerations it can be realized that: (a) = max vi |T a Adi | = A Ad i
i{1,...,I}

(4)

The lter design problem is thereby solved by minimizing the function (a). Since the amplitude function A() and the desired amplitude specication Ad () are real functions, the absolute valued inequality relation in (3) can be written as linear inequalities with sign as vi (T a Adi ) , i = 1, . . . , I i vi (T a Adi ) , i = 1, . . . , I i where can be seen as as an extra independent variable. The problem formulation becomes minimize , subject to , i = 1, . . . , I vi (T a Adi ) 0 i T vi (i a Adi ) 0 , i = 1, . . . , I (5)

(6)

The optimal solution (ao , o ) to (6) gives the Chebyshev solution ao which minimizes the max-norm (2) and at the same time the Chebyshev error o = aT Ad . o The problem formulation in (6) is a so called linear program, which implies that the objective function and the constraints are linear. The formulation in (6) ts in the general description of a linear program given by minimize f T x, subject to Bx b (7)

where the minimization is done over the independent n 1 vector x. The linear objective function is dened by the constant n 1 vector f and the linear constraints are given by the an mn matrix B and the m1 vector b. There is a function lp in MATBLABs Optimization Toolbox which can solve (7) by the command: >> x=lp(f,B,b) The function lp will be replaced in later versions of MATLAB by the function linprog. There are some dierence between these two optimization routines. The commands for linprog is:

>> options=optimset(LargeScale,off,MaxIter,1000); >> x=linprog(f,B,b,[],[],[],[],[],options); The rst command disables the Large Scale optimization, which is default enabled in linprog, and at the same time denes the maximum iteration number. Observe that for large problems (problems with many variables and constraints), the number of iterations might have to be increased. The algorithm used in lp and linprog is a variant of the simplex algorithm.

Theory problems

a) Let x = [aT ]T and determine the structure of f , B, and b so that problem formulation (6) ts into (7). Use the variables vi , i and Adi .

Design problems

a) Make a minimax design of a Type 1 linear-phase lowpass FIR lter using the method described above. Use the lter length N = 21. The specication is given by Adi = 1 for i [0, p ] 0 for i [s , ] vi = 1 for i [0, p ] vs for i [s , ] (8)

where p = 0.4 and s = 0.6 are the edges for the passband and the stopband respectively. The frequency spacing is set to i+1 i = 0.01. Plot the amplitude response in dB together with the least-squares solution using the method described in Task 1. Use the frequency weights vs = 1 and vs = 100 in the stopband for both the minimax and least-squares design. Which design works best? What is the max-norm for the dierent solutions?

b) Make a minimax design of a Type 1 linear-phase highpass FIR lter using the method described above. Use the lter length N = 21. The specication is given by: Adi = 0 for i [0, s ] 1 for i [p , ] vi = vs for i [0, s ] 1 for i [p , ] (9)

Use s = 0.4 and p = 0.6 with the frequency spacing set to i+1 i = 0.01. Plot the amplitude function in dB together with the corresponding least-squares design using the method described in Task 1. Use the frequency weights vs = 1 and vs = 100 in the stopband for both the minimax and leastsquares design. Which design works best? What is the max-norm for the dierent solutions?

c) Make once again a minimax design of a Type 1 linear-phase lowpass FIR lter using the method described above.Use the lter length N = 21. The specication is given by: Adi = 1 for i [0, 0.4] 0 for i [s , ] vi = 1 for i [0, 0.4] vs for i [s , ] (10)

Use the frequency spacing i+1 i = 0.01 as before. The ripple in the passband shall be limited to |T a Adi | 0.1 for i [0, 0.4] and the i stopband attenuation must be better than 50dB. Determine the frequency weights in the stopband vs and the stopband edge s so that the given specication is fullled. The stopband edge s shall be as small as possible. Hint: Find an appropriate value of the stopband frequency weights vs for the given attenuation demands in the error function |T a Adi |. Then, make i a minimax design with dierent s and draw the error function |T a Adi | i in dB. Repeat until you are satised with the result. What is the nal value of vs and s ?

The linear programming method described above uses the property of the linear structure which comes along with linear-phase lter. A minimax lter with arbitrary phase characteristics (complex specication) cannot be approximated using this method. However, there is another method to approximate the Chebyshev solution using a linear program. This is the topic of the next task.

Vous aimerez peut-être aussi