Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Lab 6

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

Digital Signal Processing (EEE F434)

Lab 6: Sampling rate conversion


Instructions:
1. Lab report to be submitted (on Nalanda) on the day of the lab during lab hours, latest by 6 PM; late
submission will not be considered; use the lab hours to finish all the work
2. All the tasks in each lab have to be in one main MATLAB file with a “.m” extension; differentiate each
question by commenting. Alternatively, you can zip all .m files together, name them appropriately and
upload one zip/rar file. Make one word/pdf file with all the results corresponding to the questions
3. Plots should include x label, y label, legend, and titles
4. File name: ID_Lab6.m/ID_Lab6.rar or zip and ID_Lab6.pdf
5. If the report/code is found to be copied, zero marks will be awarded

1. Let x(n) = 0.9nu(n). The signal is applied to a down sampler that reduces the rate by a factor
of 2 to obtain the signal y(m).
a. Determine and plot the spectrum X(ω).
b. Determine and plot the spectrum Y (ω).
c. Show that the spectrum in part (b) is simply the DTFT of x(2n).

2. Consider two sequences x1(n) and x2(n), which appear to be related


x1(n) = max (10 − |n|, 0) and x2(n) = min (|n|, 10)
Use the resample function with default parameters.
a. Resample the sequence x1(n) at 3/2 times the original rate to obtain y1(m), and provide
the stem plots of both sequences.
b. Resample the sequence x2(n) at 3/2 times the original rate to obtain y2(m), and provide
the stem plots of both sequences.
c. Explain why the resampled plot of y2(n) has inaccuracies near the boundaries that y1(n)
does not have.
d. Plot the frequency response of the filter used in the resampling operation.

3. Using the function interp, and upsample to study the operation of factor-of-4 interpolation
and upsampling, respectively, on the sequence 0.2n, 0 ≤ n ≤ 100. Use the stem function to
plot the original and the interpolated/upsampled sequences.

4. Consider the analog signal xa(t) = cos (20πt + θ), 0 ≤ t ≤ 1. It is sampled at Ts = 0.05 sec intervals
to obtain x(n). Let θ = 0, π/6, π/4, π/3, π/2. For each of these θ values, perform the following.
a. Plot xa (t) and superimpose x(n) on it using the plot (n, x,’o’) function.
b. Reconstruct the analog signal ya (t) from the samples x(n) using the sinc interpolation (Use
Δt = 0.001) and superimpose x(n) on it.
c. Reconstruct the analog signal ya (t) from the samples x(n) using the cubic spline
interpolation and superimpose x(n) on it.
d. You should observe that the resultant reconstruction in each case has the correct
frequency but a different amplitude. Explain this observation. Comment on the role of phase
of xa (t) on the sampling and reconstruction of signals.

---------------------------------------------------------

You might also like