lab 9 improved fir filter
Download
Skip this Video
Download Presentation
Lab 9 Improved FIR filter

Loading in 2 Seconds...

play fullscreen
1 / 6

Lab 9 Improved FIR filter - PowerPoint PPT Presentation


  • 131 Views
  • Uploaded on

Lab 9 Improved FIR filter. Using SystemView. Improved FIR filter. Lab objective Use SystemView to simulate/analyze an improved window based filter. This is similar to the filter we analyzed in Lab 8, but is improved by using a Hamming window.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Lab 9 Improved FIR filter' - colorado-hooper


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
improved fir filter
Improved FIR filter

Lab objective

Use SystemView to simulate/analyze an improved window based filter. This is similar to the filter we analyzed in Lab 8, but is improved by using a Hamming window.

I hope we’ll be able to do a realtime implementation of this filter using the Analog Devices EZ-Kits next week. If not, we’ll implement it using Matlab.

slide3
Improved FIR filter

First, we’ll use Matlab to generate a Hamming window, and apply it to the truncated and shifted impulse response we used in Lab 8.

The formula for the Hamming window is given in Cartinhour, eq. 9-7. Use this formula, in Matlab, to generate a Hamming window with N = 29.

Import the filter coefficients we used in lab 8, which are in the file coeffs.txt. Use the Matlab fopen, fscanf, and fclose functions.

slide4
Improved FIR filter

Save the coeffs.txt file in your Matlab “Work” directory, or in a directory in the search path if using Octave.

Open it for reading:

fid = fopen(‘coeffs.txt’, ‘r’);

create a vector to hold the raw impulse response, then read in the coefficients using fscanf:

hi = zeros(1, 29);

hi = fscanf(fid, ‘%9f’);

Close the file.

fclose(fid);

slide5
Improved FIR filter

Transpose the vector you just read:

hi = hi’;

Plot the raw impulse response

Plot the Hamming window you generated

Now, multiply the Hamming window point-by-point with the raw impulse response. If your Hamming window vector is called w,

h = w .* hi;

Plot the result, note the differences.

Now, write the windowed impulse response to a new file.

slide6
Improved FIR filter

Create a new file ‘hcoeffs.txt’, and open it for writing:

fid = fopen(‘hcoeffs.txt’, ‘w’);

fprintf(fid, ‘%9.6f\r\n’, h);

fclose(fid);

Turn in your Matlab code, and your hcoeffs.txt file

Now, repeat Lab 8. Use your hcoeffs.txt file in place of the coeffs.txt file you used in Lab 8. Notice the IMPROVED results.

ad