EXPERIMENT 4 AN FIR FILTER written by Neal Glover ()

advertisement
EXPERIMENT 4
AN FIR FILTER
written by Neal Glover (nealglover@uky.campus.mci.net)
Anthony Reeves (acrv@msg.ti.com)
Kevin Donohue (donohue@engr.uky.edu)
University of Kentucky
Electrical Engineering Department
Date of last revision (11-12-01)
Geethvani Goli
Vijay Venkatesh
Chun Guan
REFERENCES
Digital Signal Processing,
(Ifeachor and Jervis,1993)
DSKD Starter Kit Manual
TMS320CXX Users Guide
TLC32040 Spec Sheets
EQUIPMENT AND MATERIALS
DSKD Starter Kit w/ Debugger
Personal Computer
RS232-C Interface Cable
RCA Jack
9 Vac power supply (for the DSK)
Signal Generator
Oscilloscope
Matlab
INTRODUCTION
This experiment will apply many of the previously learned concepts to
the
development of a digital finite impulse response (FIR) filter. The
goal is
to integrate critical aspects such as efficient storage and
manipulation of
input data, optimal scaling of coefficients and input, intermediate,
and
output values, and the necessary coordination of I/O.
A sample filter coefficient file BP45.COF (or lab4_header.txt) is given
and your Filter coefficients
file should be in place for the program.The sample file BP45.COF can be
opened in
Notepad.A sample program Lp11sim.asm (or lab4_sample.asm) which
implements operations equivalent to
filtering , which makes use of special circular addressing is
provided.The communication
routine for I/O which was done previously is also provided for the
serial Port interface.
PROCEDURE
1. With the power turned off, connect your board to the PC RS232-C
port on
the computer. Connect the 9 Vac adapter to the board and plug into
an
outlet. Turn on the PC and change to the directory containing the
program DSKL.
2. Run the DSKL (DSK5L) program and verify that the DSK_COMM program
loaded
correctly. Now execute the AUTOTEST (command "A") and verify that
the
loop tests passed. If so the DSK is connected and functioning
correctly
and you are ready to begin work. Exit the DSKL program.
3.
For a sampling rate of 8 kHz, design 2 linear phase lowpass digital
filters with a cut-off frequency of 2 kHz. Use Matlab to design
the
lowpass filter using both a frequency sampling method and the Remez
algorithm. Choose any order between 10 and 15. List the order and
the coefficients obtained.Convert the coefficients into a .COF file
and use that in your program.
4.
Implement direct form structure FIR filters using the coefficients
above. Apply a 1 volt DC signal and measure the voltage level at
the
output.
Is the result what you would expect?
Explain.
Change
the
input to a sinusoid and measure the output amplitude as the
frequency
is varied through a range of 50 Hz to 3500 Hz. Take particularly
dense
measurements around the cutoff.
If the output is a clean sine
wave,
an AC volt meter can be used to measure the amplitude. Compare the
measured spectra for the filters designed by the frequency sampling
method and the Remez algorithm.
Download