[Lui's homepage] [DSP homepage]
CE 101, 2nd Semester 2003-2004
Lab Exercise 5Magnitude Response
1. Using the openoffice spreadsheet, obtain a graph of the magnitude response of the finite impulse response (FIR) filter specified by the difference equation,
M-1 y(n) = sum h(k)x(n-k) k=0where M = 64, and the coefficiets h(n), n = 0,...,63, are as follows:
h(0) = h(63) = -0.000158126130000595
h(1) = h(62) = -0.000478357664687351
h(2) = h(61) = -0.000801661859271876
h(3) = h(60) = -0.00110308549297515
h(4) = h(59) = -0.00132172249376453
h(5) = h(58) = -0.00136202669388539
h(6) = h(57) = -0.0011120329442612
h(7) = h(56) = -0.000476799980284982
h(8) = h(55) = 0.000579729798449221
h(9) = h(54) = 0.00199526015169846
h(10) = h(53) = 0.00358456090475661
h(11) = h(52) = 0.00504093135426444
h(12) = h(51) = 0.00597041268497614
h(13) = h(50) = 0.00595859162735932
h(14) = h(49) = 0.0046618924422662
h(15) = h(48) = 0.00190795478936417
h(16) = h(47) = -0.00221519988670355
h(17) = h(46) = -0.007302606005794
h(18) = h(45) = -0.0126263939533596
h(19) = h(44) = -0.0171907724840236
h(20) = h(43) = -0.0198475323191142
h(21) = h(42) = -0.0194597067397005
h(22) = h(41) = -0.0150902257239541
h(23) = h(40) = -0.00618501702109644
h(24) = h(39) = 0.00728221471782563
h(25) = h(38) = 0.024732532464351
h(26) = h(37) = 0.0449911864134062
h(27) = h(36) = 0.0663897640447006
h(28) = h(35) = 0.0869513189490387
h(29) = h(34) = 0.104634017163135
h(30) = h(33) = 0.117597777544398
h(31) = h(32) = 0.124453122342888 .Plot at least 100 points of |H(w)| against w in the range [0..pi].
2. Write code in the 'C542 assembly language simulating the FIR filter above, in the sense that the input to the filter shall be from an array of locations in memory, and the output of the filter will be written to another array of locations in memory.
Let the input to the filter be at least 200 samples of
0.25 sin( 2 pi f1 t)
where f1 is the frequency assigned to you. [frequency assignments]. Use 8000 Hz as sampling rate.
Produce a graph of the "output" produced. Be sure to set all graph parameters appropriately. In particular, the graph should reflect the real amplitude of the output signal, and the actual time on the horizontal scale, measured in seconds or milliseconds, assuming the input starts at time t = 0.
Use alt-PrintScreen to capture the graph generated. Be able to show this graph during evaluation of this lab exercise.
Be able to explain how the graph generated in part 2 is consistent with the graph generated in part 1.
Be able to answer all questions related to this exercise. During evaluation of this exercise, you must have with you on files or on paper any and all forms of documentation that you would need to show and/or discuss how you went about doing this exercise.
This page has been accessed
times since January 26, 2004.