S522, Kewley-Port
Spring, 2008

Assignment #10

Specific Assignments from Chap 8 & the Kuc Handout for the lab, Week 10, due 3/26.


Do and hand in DSPFIRST book problems, 8.14, 8.16, 8.17 (note matches not exact, only "reasonable"), and 8.22.


Use PEZDEMO Matlab gui from Oncourse for the following interactive filter design. Follow specifically Example 7.6, p. 254, from the Kuc reading to implement an bandpass filter. Answer any questions in steps 1 - 6 and turn in with printouts.

1) Enter a singularity #1, a complex conjugate pole at r= .7, ang = 93° degrees, .7/_ 93°. What are the exact coordinates? Using 'Edit' under Pole Locations to make the coordinates exact for this pole.

2) Enter the first two zeros, singularities 2 & 3, 1.0/_0° and 1.0/_180°. Steps 1 & 2 make a CSOS. Write out the H(z) for this CSOS.

3) Interactively enter singularities 4-7. Place and erase poles and zeros until you are satisfied from the magnitude spectrum that you have achieved the desired bandpass filter shape. These are NOT the exact poles and zeros in Kuc, but rather ones that are suitable for the design as you interpret it. Use zoom enable to check the ripple, although this is hard to do in this linear magnitude window.

4) Print out the PEZDEMO windows for your full filter.

5) Use 'Export' to obtain the exact roots for your singularities. This export will save the poles/zeros in rectangular notation in a .mat file (you can name, e.g. filt75.mat). In the command window, 'load filt75.mat' to import the poles/zeros. The poles/zeros are hidden in a cell array named 'savedata'. (Cells are cool data structures. Check "Cell arrays" in MatLab Help.) You can see the contents of the cell by typing 'celldisp (savedata)'. There are about 9 kinds of information in this cell. the poles can be accessed in 'savedata{4}' and the zeros in 'savedata{5}'. Note you can copy them from the screen too.

Now draw the system diagram for YOUR CSOS filters, similar to Fig. 7-11c but for your filter coefficients. First you will need to convert the rectangular coordinates into cascading second-order z-tranforms. You may find the conversion from rectangular to polar helpful, 'cart2pol'. Be sure to include the gain coefficient of 0.036. Write out the system equation, H(z) too.

6) To actually implement this filter, you need to write out the full linear difference equation for your own coefficients. Use 'Filter Coefficents' button on at the top. It will display the a and b coefficients for the full system polynomial (scroll). To view or use them, use the 'export' button and save them as a .mat file, e.g. named coeff75.mat. 'Load coeff75.mat' in the command window. The polynomial coefficients are in a cell array called 'filter_co' (use 'celldisp (filter_co)' to examine). The extract the values, filter_co{1} has the a coefficients, and filter_co{2} has the b coefficients. Remember the gain coefficient 0.036. OK, now you can write out the difference equation for your filter.

{Updated on 3/16/08}