Rich Kozick
Spring, 1997

EE 329: Laboratory 9
Digital Filter Design and Implementation


We have studied several methods for designing FIR filters, and we have learned how to design FIR and IIR filters with Matlab. The objective in this lab is to implement some of the filters we have designed using a C program that runs on a dSPACE box.

Please design lowpass FIR and IIR digital filters to meet the specifications on Homework 8, which in terms of a normalized sampling rate of 1 Hz are:

Sampling rate: 1 Hz (you choose a suitable value for implementation)
Passband: 0 to 0.2 Hz
Stopband: 0.25 to 0.5 Hz
Passband ripple: less than 1 dB
Stopband attenuation: at least 40 dB
Choose a design method that produces digital filters with "minimum complexity". In other words, try to design filters that require the least amount of computation per sample in the real-time implementation.

In order to transfer the digital filter coefficients from Matlab to your C program, the following Matlab commands are useful. Suppose a and b are Matlab variables containing the coefficients. These variables can be saved in text files a.txt and b.txt as follows:

save a.txt a -ascii -double
save b.txt b -ascii -double
Then you can insert the filter coefficients from these files into your C program.

Lab Report: You do not have to submit a written lab report. Instead, please demonstrate the following during lab:

Please begin working on your final projects. Stop in to talk with me next week about your projects if you have questions, and I will discuss your progress during lab on Friday, April 18.

Thank you.