Question: A widely used linear-phase FIR filter design is based on the Parks-McClellan algorithm, which results in an optimal FIR filter with an equiripple weighted error.
A widely used linear-phase FIR filter design is based on the Parks-McClellan algorithm, which results in an optimal FIR filter with an equiripple weighted error. It makes use of the Parks-McClellan optimal equiriple optimization algorithm and is available in Matlab as the function "firpm". This function can be used to design any type of single band or multiband filter. In its basic form, the command b=firpm(N,F,A,W) returns a vector b of length N+1 containing the impulse response coefficients of the desired FIR filter in ascending powers of z-1. F is the vector of specified frequency points, arranged in increasing order, in the range 0 to 1 with the first frequency point being 0 and the last frequency point being 1. The sampling frequency is assumed to be 2 Hz. The desired magnitudes of the FIR filter frequency response at the specified band edges are given by the vector A, with the elements given in equal-valued pairs. The desired magnitude responses in the passband(s) and the stopband(s) can be weighted by the vector W. The order N of the FIR filter to meet the given specifications can be estimated using "firpmord" command. It can be used in the following form: [N, F, A, W]=firpmord(F,A,Dev,Fs). To plot the frequency response in dB and phase response, Matlab command "freqz" can be used. Example: a lowpass filter with passband edge at 1500Hz, stopband edge at 2000Hz, the passband and stopband ripples are 0.01 for both bands, the sampling frequency is 8000Hz. We can use firpmord to estimate the filter length. >>F=[1500, 2000]; >>A=[1,0]; >>Dev=[0.01,0.01]; >>fs=8000; >>[N,Fi,Ai,W]=firpmord(F,A,Dev,fs); To find the filter coefficients, use firpm command: >>h=firpm(N,Fi,Ai,W); To plot frequency response : use freqz; >>freqz(h,1); To find more information on these two commands, type "help firpmord" or "help firpm" in Matlab. For the design of IFIR filter, you can use "ifir" command in Matlab. Type "help ifir" in Matlab for details.You need to submit a lab report and all m files used in your experiment. You can print your code and plots using "PUBLISH" function in MATLAB, as shown below. It publishes code, results, and plots. You can cut and paste code and results to your report.The lab report should consist of following sections. The QThe lab report should consist of following sections. 1. A cover page including the title, name, student number, date, and location (virtual for this semester). 2. A table of content. 3. Introduction of the lab. 4. Equipment: list equipment and software used. 5. Results and Discussion: this is the main part of your lab report. Please include your codes, and plots. Note: the code must be well documented. If you were asked to compare experimental results to the calculations, or to explain parts of your experiment, it should be presented in this section. 6. Conclusion: state what you learn from this lab, lab objectives you achieved, and any difficulties you met. 7. Appendix: for MATLAB code used in lab (or you can include your code in Results and Discussion section). The lab report should submit to course website under "Lab" section before the deadline. Files to be submitted: Your written lab report and MATLAB code (you can include your code in Results and Discussion section or in Appendix).
The question is write a matlab program to eliminate the noise from the sound file.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
