hw06_w07_sol

hw06_w07_sol - Digital Signal Processing - EECC 451...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Digital Signal Processing - EECC 451 Solutions - Homework # 6 Problem 1: A DSP system consists of three FIR filters F 1 , F 2 and F 3 . F 1 and F 2 are connected in parallel and F 3 is in series with the parallel connection. The difference equations for each filter are F 1 : y [ n ] = 1 2 x [ n ] + x [ n- 2] F 2 : y [ n ] = 1 2 x [ n ]- 2 x [ n- 1] F 3 : y [ n ] = 2 x [ n ] + 3 x [ n- 1] a) Find the impulse response of the overall system (e.g., the equivalent impulse response of the filter interconnection). b) Using Matlab (Octave) and the function filter find the response of the system to the in- put x [ n ] = u [ n ]- u [ n- 10] . Then plot (using stem ) in the same figure the input signal (in one color) and the output signal in another color, for example use the sequence of com- mand stem(x,b);hold on;step(y,r);hold off . Show the commands used to generate the plot and include a hard copy the plot with your report. c) Find the frequency response of the overall system. d) Use Matlab (Octave) to obtain a plot the frequency response of the system. Include the magni- tude and phase plots in one figure ( e.g. , use subplot ) Show the commands used to generate the plot and include a hard copy the plot with your report. Solution a) The impulse response of each filter is h 1 = { 1 / 2 , , 1 , } h 2 = { 1 / 2 ,- 2 , } h 1 = { 2 , 3 , } Therefore, the overall impulse response is h = ( h 1 + h 2 ) * h 3 Clearly h 4 = h 1 + h 2 = { 1 ,- 2 , 1 } . Organizing the convolution operation in a table we have h 4 : 1-2 1 h 3 : 2 3 2-4 2 3-6 3 2-1-4 3 and the answer is h = { 2 ,- 1 ,- 4 , 3 } b) The matlab (octave) code used to generate the plot shown is % FIR Filtering % Written by: Juan C. Cockburn (Feb 2008) b=[2 -1 -4 3]; % Filter Coefficients n_i=-2; % Initial time x=[zeros(1,abs(n_i)) ones(1,10) zeros(1,10)]; % Input Signal n_f=length(x)-1+n_i; % Final time n=n_i:1:n_f; % Time grid y=filter(b,1,x); % Find output c J.C. Cockburn 1 of 9 Digital Signal Processing - EECC 451 Solutions - Homework # 6 stem(n,x,-b);hold on % Plot response stem(n,y,r--);hold off xlabel(Time [samples])...
View Full Document

This note was uploaded on 04/07/2008 for the course EECC 451 taught by Professor Cockburn during the Winter '08 term at RIT.

Page1 / 9

hw06_w07_sol - Digital Signal Processing - EECC 451...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online