11.01.2015 Views

Introduction to Digital Signal and System Analysis - Tutorsindia

Introduction to Digital Signal and System Analysis - Tutorsindia

Introduction to Digital Signal and System Analysis - Tutorsindia

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Introduction</strong> <strong>to</strong> <strong>Digital</strong> <strong>Signal</strong> <strong>and</strong> <strong>System</strong> <strong>Analysis</strong><br />

Spectral <strong>Analysis</strong> by DFT<br />

%Examine signal components<br />

%sampling rate 1024Hz<br />

N=1024;<br />

dt=1/N;<br />

t=0:dt:1-dt;<br />

%****define the signal**<br />

x=0.1*sin(2*pi*32 .*t ) + ...<br />

0.2*sin(2*pi*107.5 .*t )+ ...<br />

0.15*sin(2*pi* 422.5 .*t ) ;<br />

%***********************<br />

subplot(2,1,1);<br />

plot(t,x);<br />

axis([0 1 -1 1]);<br />

xlabel(‚seconds‘);<br />

ylabel(‚x[n]‘);<br />

X=fft(x);<br />

df=1;<br />

f=0:df:N-1;<br />

subplot(2,1,2);<br />

plot(f,abs(X));<br />

axis([0 N/2 0 120]);<br />

xlabel(‚Hz‘);<br />

ylabel(‚|X[k]|‘);<br />

Q7.2 Use MATLAB code <strong>to</strong> apply rectangular, triangular <strong>and</strong> Hamming windows <strong>to</strong> the signal<br />

⎛ 2p<br />

72 n ⎞ ⎛ 2p196.5n<br />

⎞<br />

x[<br />

n]<br />

= 0.1sin⎜<br />

⎟ + 0.2sin⎜<br />

⎟ + 0.15<br />

⎝ 1024 ⎠ ⎝ 1024 ⎠<br />

⎛ 2p<br />

408n<br />

⎞<br />

sin⎜<br />

⎟<br />

⎝ 1024 ⎠<br />

Observe the level of magnitude <strong>and</strong> the distribution of side-lobs carefully <strong>to</strong> find any improvement of leakage reduction.<br />

Sketch the screen display <strong>and</strong> make your comments. Make sure the shape of the envelope in the time domain is drawn<br />

according <strong>to</strong> the window function.<br />

109<br />

Download free ebooks at bookboon.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!