Filter Design using Linear Programming
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
Vary the design parameters (in a scientific way) and show their impact on thegenerated filter Your filter response graphs should show the magnitude
The goal of this project is to design a symmetric moving average filter using linear programming. You are required to submit well-commented Matlab code, labelled graphs and a very very very very short discussion based on the results. This is the first time thisproject has been assigned so expect a little bit of frustration. Enjoy the journey and do not be afraid to explore beyond what is asked.
Requirements
-
Findthe coefficients a0, a1, . . . , aN of a symmetric moving average These filters are used in engineering and finance and have the form
y(n) = aN x(n + N ) + aN−1x(n + N − 1) + · · · + a1x(N + 1) + a0x(n) + a1x(n − 1) +
· · + aN−1x(n − N + 1) + aNx(n − N )
The frequency response of the filter is given by
H(ω) = a0 + a1 ∗ 2cos(ω) + · · · + ai ∗ 2cos(iω) + · · · + aN ∗ 2cos(N ω)
-
Thedesired response of the filter is
-
Selectthe coefficients to minimize the magnitude of the difference between the desired response and actual response, i.e.,
where ωi, i = 1, . . . , M are frequencies of your choice between 0 and π.
-
Allow a transition band of π/20 on either side of the cutoff frequency π/2 wherethe
response has no impact on the cost function.
Steps
-
Expressthe problem as a linear programming problem and implement it in Matlab.
-
Your design parameters are N the order of the filter, M the number of frequencies in the cost function and ωi, i = 1, . . . , M the locations of the frequencies in the cost function. Vary the design parameters (in a scientific way) and show their impact on thegenerated filter Your filter response graphs should show the magnitude response in dB vs frequency. (Matlab has a function freqz which may be of some use) Do not be afraid to put multiple curves on one graph to ease the comparisons.
-
You can trade off error in the passband with error in the stopband by changing the numberof frequencies you choose in each region or you can change your cost function to weight one type of error more than the Reformulate the problem to use the latter approach, and demontrate the effect of weighting on the resulting response.