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

EEE2303 Digital Signal Processing

Assignment # 01 – Sampling and Reconstruction of Signals

Consider the following analog signal

𝑥 (𝑡) = 3 cos(2000𝜋𝑡) + 5 sin(6000𝜋𝑡) + 10 cos(12000𝜋𝑡)

a) Plot the analog signal in MATLAB. Chose an appropriate time window


considering the frequency components of the composite signal 𝑥 (𝑡).
b) What is the Nyquist
% Defineratethefor
timethis
vectorsignal?
t = 0:0.00001:0.02; % Time window from 0 to 0.02 seconds
c) Derive the discrete-time form of 𝑥 (𝑡) for the Nyquist sampling rate.
Generate a MATLAB% Define code and plot the discrete signal.
the signal
x_t = 3 * cos(2000 * pi * t) + 5 * sin(6000 * pi * t) + 10 * cos(12000 * pi * t);
d) Assume now that we sample this signal using a sampling rate 𝐹 = 5000
samples/s. What% is Plotthe discrete time signal obtained after sampling?
the signal
figure;
Hint: redo the previous
plot(t, x_t); calculation in part (c) for the new sampling rate.
title('Composite Analog Signal');
e) What is the analog signal 𝑦 (𝑡) we
xlabel('Time (s)');
can reconstruct from the samples
obtained in partylabel('Amplitude');
(d) if we use ideal interpolation.
grid on;
f) Extend the MATLAB code to plot the discrete signal obtained in part (e)
and see whether%we can
Adjust theobtain
axis limitsthe original
for better analog signal 𝑥 (𝑡).
visualization
axis([0 0.02 -15 15]);

You might also like