A discrete-time system with an impulse response

h(n) = 0.5 ( cos(w n) + cos(w n)) L His described by a difference equation

y(n) + a y(n-1) + a y(n-2) + a y(n-3) + a y(n-4) = 1 2 3 4 b x(n) + b x(n-1) + b x(n-2) + b x(n-3) 0 1 2 3You can get the 56002 to act as a digital oscillator by programming it to implement this system.

- Write a MATLAB
*m*-file which will calculate the*a*and*b*coefficients when given the two frequencies. - Write a program for the 56002 which will implement the difference
equation.
- Modify last week's lab to handle a fourth order IIR system.
- At time n = 0, y(n) = 1.0 and x(n) = 1.0. For n > 0, x(n) = 0.
In the initialization section of your program, set y(nmk) = 0 for all k except
k = 0; for k = 0, set y(nm0) = 1.0. Set x(nmk) = 0 for all k except
k = 0; for k = 0, set x(nm0) = 1.0.
- From this point on, your program needs no input. In the section of the
program where you read data from the A/D converter, just
`clr a`before you use this data value.

- Modify last week's lab to handle a fourth order IIR system.
- Figure 8.1.3 of the text shows the two frequencies associated with
telephone keypad -- e.g., pressing the ``1'' key will generate a tone with
frequencies 697 Hz and 1209 Hz. Run your MATLAB program to find the
*a*and*b*coefficients for several different keys. - Test your program. Listen to the different outputs and see if they
sound like telephone key presses. Look at the outputs on an oscilloscope and
try to determine if the two correct frequencies are present.

Mon Oct 7 1996

Copyright © 1996, New Mexico Tech