Hw-8 - The University of Akron Engineering Faculty...

Info iconThis preview shows pages 1–9. 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

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight 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: The University of Akron Engineering Faculty Electrical & Computer Department Digital Signal Processing I Dr. Roberto J. Acosta Course # 4400:646 Homework # 8 DSP I Student Name: Sriram Yarlagadda Student Number: 2196944 Due Date GRADE: Jan 30 2009 PROBLEM-1 Given: Required: Solution: For Analog system the time domain impulse response and Frequency response (amplitude and phase) are obtained as follows using a MATLAB program Time Domain impulse Response %Problem -1a %Given analog filter Transfer function Ha(s)=OmegC/(s+OmegC) %Required --to obtain the time domian impulse response %Applying the inverse laplace transforms to obtain the %time domain impulse response %on Applying inverse laplace transforms %time domain impulse response is Ha(t)=OmegC*exp(-OmegC*T) clc; clear all ; close all ; OmegC=10; %radians/sec N1=5; Ha=zeros(N1,1); x=1; for t=0:0.1:N1 Ha(x)=OmegC*exp(-OmegC*t); x=x+1; end figure(1) plot(Ha) title( 'Impulse response of analog filter' ); xlabel( 'Magnitude of impulse response' ) ylabel( 'time' ) Frequency Response %obtaining the frequency response for the analog filter %replace S-->jw w--rad/sec N2=1000; num=OmegC; mag1=zeros(N2,1); phase1=zeros(N2,1); for w=1:1:N2 den=i*w+OmegC; mag1(w)=20*log10(abs(num/den)); phase1(w)=angle(num/den); end figure(2) subplot(2,1,1) plot(mag1) title( 'magnitude response of the analog filter' ) xlabel( 'Frequency --rad/sec' ) ylabel( 'Magnitude in dB' ) subplot(2,1,2) plot(phase1) title( 'Phase response of an analog filter' ) xlabel( 'Frequency --rad/sec' ) ylabel( 'Phase---angle/dec' ) For Digital system the time domain impulse response and Frequency response (amplitude and phase) are obtained as follows using a MATLAB program Time Domain Impulse Response %obtaining the time domain impulse response of the digital filter %the difference equation obtained is %y[n]=alpha*y[n-1]+a*(x[n]+x[n-1]) N3=100; alpha =(1-OmegC)/(1+OmegC); a=(1-alpha)/2; x=zeros(N3,1); y=zeros(N3,1); %x[n] is an impuls input x(1)=1; y(1)=a*x(1); for n=2:1:N3 y(n)=alpha*y(n-1)+a*(x(n)+x(n-1)); end figure(3) plot(y),grid title( 'Impulse response of the digital filter' ) xlabel( 'Magnitude of impulse response' ) ylabel( 'no of samples(time)--n' ) Frequency Response %obtaining the frequency response of the digital filter %replace z-->exp(jw) w--rad/sec w=-2*pi:0.01:2*pi; num1=a.*(1+exp(-i.*w)); den1=1-alpha.*exp(-i.*w); figure(4) subplot(2,1,1) plot(w,20*log10(abs(num1./den1))),grid title( 'magnitude response of the digital filter' ) xlabel( 'Frequency --rad/sec' ) ylabel( 'Magnitude in dB' ) subplot(2,1,2) plot(w,angle(num1./den1)),grid title( 'Phase response of an digital filter' ) xlabel( 'Frequency --rad/sec' ) ylabel( 'Phase---angle/dec' ) Comparison of Amplitude Response: In Analog system the amplitude response Magnitude goes to -40 dB finally. Similarly in digital System the amplitude response has a peak reaching the -40dB....
View Full 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 / 33

Hw-8 - The University of Akron Engineering Faculty...

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

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