Lab01-1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

ECED 4502 – DSP Lab 1

Laboratory 1. Spectral Representation of Finite Length Signals


One of the issues to deal with when interpreting the spectrum of a signal is the fact that
we will only be able to have a segment of it available to compute the spectrum. The most
obvious restriction is the finite memory size of the system. Therefore we can only have a
finite interval of the evolution of the signal versus its independent variable, say time t.
We can mathematically represent this effect using what is called a window in order to
truncate the signal in time. In this lab we use the default rectangular window w(t).

Review/study and run the MATLAB file “windowing.m” provided on the website.
It produces the plots attached at the end that correspond to Part 1.

1. a) Given the following signals for which t is given in [ms]:

x1 (t ) = e j 2π(0.5)t ⋅ w(t ) , this is a 10ms window of a 0.5kHz complex exponential,


x2 (t ) = cos(2π(0.5)t ) ⋅ w(t ) , this is a 10ms window of a 0.5kHz cosine,
x3 (t ) = cos(2π(0.5)t ) ⋅ w(t / 2) , this is a 20ms window of a 0.5kHz cosine,

1, t < 5ms



where w(t ) =  , this is a 10ms rectangular window.
0, t > 5ms

Plot the nonzero segments of x2(t) and x3(t) using fS = 4 kHz.
b) Each signal above is sampled using the train of impulses shown below with a
sampling frequency fS = 4 kHz.
Plot the spectra Ω of the sampled versions of the three signals above using
linear frequency F in kHz for the x-axis. Use a 2,000 points DFT.

p (t ) =  δ(t − nTs )
n = −∞

xi(t), i = 1, 2, 3 xP(t)

c) For the MATLAB plots corresponding to the spectra comment on:


i. The peak value of each spectrum
ii. The frequency spacing between consecutive zeros, and
iii. The widths of the main-lobes.
ECED 4502 – DSP Lab 1

2. The signal
x(t ) = cos(2π(0.5)t ) + cos(2π(0.6)t ) , t in [ms]
is analyzed using three rectangular windows:
i. x1 (t ) = x(t ) ⋅ w(t ) ,
ii. x2 (t ) = x(t ) ⋅ w(t / 2) , and
iii. x3 (t ) = x (t ) ⋅ w(t / 4) ,
using the same window w(t) defined in part 1.
Using MATLAB sample these three signals at a sampling rate fS = 4 kHz and:
a) Plot their time representation for those intervals the signals are not zero,
b) Plot their spectra for the frequency range 0 to 1kHz. Use a 2,000 points DFT.
c) Are there any significant differences among the spectra obtained? Are both
frequency components, 500 & 600Hz, clearly recognized in all cases? Explain.

3. The impulse response


h(t ) = sinc(t ) †, t in [ms]
is used to design three filters by employing different lengths of it:
i. h1 (t ) = h(t ) ⋅ w(t ) ,
ii. h2 (t ) = h(t ) ⋅ w(t / 2) , and
iii. h3 (t ) = h(t ) ⋅ w(t / 4) ,
where w(t) is as defined in part 1.
Using MATLAB sample these three impulse responses at a sampling rate fS = 4 kHz
and:
a) Plot their time representation for those intervals they are not zero,
b) Plot the filter frequency responses for the frequency range -1 to 1kHz.
Use a 2,000 points DFT.
c) Are there any significant differences among the frequency responses obtained?
Comment on each difference.
d) What is the passband gain value of the sampled impulse responses shown in (b)?
Verify this result is consistent with that shown in your MATLAB plots.

e) What is the cutoff frequency Fc in kHz of the ideal filter h(t) ↔ Ω ?
Verify this result is consistent with that shown in your MATLAB plots.

In your report please answer each part requiring an answer/comment, submit


MATLAB plots and the code used to obtain them.


=
ECED 4502 – DSP Lab 1

Part 1 plots produced by MATLAB script provided on webpage


ECED 4502 – DSP Lab 1

Part 1 plots produced by MATLAB script provided on webpage (cont’d)

You might also like