# DSPHW2 - THE UNIVERSITY OF AKRON Engineering Faculty...

This preview shows pages 1–6. Sign up to view the full content.

THE UNIVERSITY OF AKRON Engineering Faculty ELECTRICAL AND COMPUTER DEPARTMENT Digital Signal Processing-1 Dr.Roberto J Acosta Course #4400:646 Homework#2 DSP-1 Name: Krishna Namburi Student Number: 2351944 Due Date: 02/05/2010 Grade:

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

View Full Document
Problem 1: Given Frequency response 3 3 10 ( ) 1 0 0 db jw db ww H e w w otherwise 1. Compute impulse response(closed form solution) Soln : To find the impulse response we should apply Inverse Discrete Fourier Transform( IDTFT ). Which is 1 ( ) ( ) 2 jw jwn H e e dw h n Hence 33 1 ( ) 0* 1* 2 w db w db jwn jwn jwn w db w db h n e dw e dw e dw = 3 3 1 2 w db jwn w db e jn = 1 2 jnw db jnw db ee nj = 1 sin( 3 ) nw db n At n=0; 3 3 3 *cos( ) () db db db w nw w hn
2. Plot the time domain impulse response(very large number of coefficients) Matlab Code: clc; clear all ; close all ; w3db=pi*0.2; n=-1000:1000; x=zeros(length(n)); for k=1:length(n) if n(k)==0 x(k)=w3db/pi; else x(k)=(sin(w3db*n(k)))/(n(k)*pi); end end k=1:length(n); stem(n,x(k)); title( 'Impulse response' ); xlabel( 'No of samples' ); ylabel( 'h(n)' ); -1000 -800 -600 -400 -200 0 200 400 600 800 1000 -0.05 0 0.05 0.1 0.15 0.2 Impulse response No of samples h(n)

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

View Full Document
3. Applied a rectangular window to the time domain impulse response of a total of 2N+1 points(N points on the negative axis , N points on the positive axis and the value at n=0). Plot the filter coefficients for N=500, 250, 125, 50. Matlab code: clc; clear all ; close all ; %plotting the impulse response: w3db=pi*0.3; N=800; p=zeros(1,2*N+1); k=1; x=zeros(1,2*N+1); for n=-N:1:N x(k)=(sin(w3db*n))/(n*pi); k=k+1; end n=-N:1:N; l=(length(n)+1)/2; x(l)=w3db/pi; %Creating a window for various number of points: for k1=[500,250,125,50] p=zeros(1,2*N+1); k=N-k1; for j=-k1:1:k1; p(k)=1; k=k+1; end y=zeros(1,2*N+1); for k=1:1:(2*N+1) y(k)=x(k)*p(k); end figure() plot(n,y)
Plotting the filter coefficients for N=500 : Plotting the filter coefficients for N=250 : -400 -200 0 200 400 600 -0.08 -0.06 -0.04 -0.02 0 0.02 0.04 0.06 0.08 0.1 Applied a window for N=500 No of samples Amplitude,h(n) -500 -400 -300 -200 -100 0 100 200 300 400 500 -0.04 -0.02 0 0.02 0.04 0.06 0.08 Applied a window for N=250 No of samples

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 02/20/2011 for the course EE EE 646 taught by Professor Dr.robertojacousta during the Spring '10 term at The University of Akron.

### Page1 / 21

DSPHW2 - THE UNIVERSITY OF AKRON Engineering Faculty...

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

View Full Document
Ask a homework question - tutors are online