<< Chapter < Page Chapter >> Page >
You will implement a multirate system that includes three fininte impulse response filters.

Part 1: filter design using matlab

Using the zero-placement method, design the FIR filters for the multirate system in Lab 2: Overview . Recall that the z -transform of a length- N FIR filter is a polynomial in z -1 , and that this polynomial can be factored into N 1 roots.

H z h 0 h 1 z -1 h 2 z -2 z 1 z -1 z 2 z -1 z 3 z -1

Use this relation to design a low-pass filter (for the anti-aliasing and anti-imaging filters of the multiratesystem) by placing twelve complex zeros on the unit circle at ± 3 8 , ± 2 , ± 5 8 , ± 3 4 , ± 7 8 , and ± . This filter that you have just designed will serve for both FIR 1 and FIR 3. For filter FIR 2 (operatingat the decimated rate), use four equally-spaced zeros on the unit circle located at ± 4 and ± 3 4 . Be sure to adjust the resulting filter coefficients to ensure that the gain does not exceed oneat any frequency.

Design your filters by writing a MATLAB script to compute the filter coefficients from the given zero locations. The MATLABfunction poly is very useful for this; type help poly in MATLAB for details.

Once you have determined the coefficients of the filters, use MATLAB function freqz to plot the frequency responses. You will find that the frequency response of thesefilters has a large gain. Adjust the resulting filter coefficients to ensure that the largest frequency gain is lessthan or equal to one by dividing the coefficients by an appropriate value. Do the frequency responses match yourexpectations based on the locations of the zeros in the z-plane?

Part 2: modular functions by mixing c and asm

In Part 2 of Lab 1 , you learned how to return a value from assembly to C. High-level C program is easy to develop and maintain, while assembly program directly exploits specialized instructions, providing run-time efficiency.

In this section, you will learn how to pass in an argument from C to the assembly function. More specifically, in the cascaded multirate system, the output of one filtering or rate conversion block is the input to another block. Thus the C program needs to be able to pass the argument to the assembly function. Your new function declaration should be of the following form: extern int filter(int filt_input);

To do this, review Sections 6.4 and 6.5 of the TMS320C55x Optimizing C/C++ Compiler User's Guide . Pay attention to the naming convention, data types and passing arguments order.

Part 3: multirate system implementation on the dsp

Implement the complete multirate system shown in Lab 2: Overview . Here are some guidelines:

  • First, implement a system that cascades only FIR 1 and FIR 2; exclude the sample-rate compressor, expander, and FIR3. Verify that the response of this two-filter system is as expected. The filters should be written in assembly (as in Lab 1), but the cascading can be done in C.
  • Next, implement the entire multirate system. Use a counter to implement the sample-rate compressor and expander. That is, the counter will determine when the compressed-rate processing is to occur, and it can also be used to determine when to insert zeros into FIR 3 to implement the sample-rate expander. This control flow can be written in C.
  • At first, use fixed compression and expansion factors of D U 4 . After you have verified that the multirate system works at a fixed rate, you should modify your code so that therate can be changed easily. You must be able to quickly change the compression and expansion factors when you demo your code .

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Ece 420 fall 2013. OpenStax CNX. Sep 26, 2013 Download for free at http://cnx.org/content/col11560/1.3
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Ece 420 fall 2013' conversation and receive update notifications?

Ask