g2(t)=cos(60pit) In this problem, we will use Matlab to simulate digital-to-anal
ID: 2292127 • Letter: G
Question
g2(t)=cos(60pit)
In this problem, we will use Matlab to simulate digital-to-analog conversion (DAC) of g2 (t)sampled at 100 Hz from Problem 3 Part (b) by convolving it with appropriate point spread
functions:
a. Generate and plot the point spread function (PSF) for the “nearest neighbor” interpolation method. Reconstruct the DAC signal and, on a different graph, plot the reconstructed signal and overlay it with the original g2 (t) and its discrete version sampled at 100 Hz.
Quantify the “closeness” of the reconstructed signal to the original signal by computing the “L2-norm” of their difference over matching regions of the signals.
b. Repeat for the “linear” interpolation method. Carefully examine your results to make sure the convolution is performed correctly!
c. Repeat for the sinc-interpolation method, except do so for different sinc kernels with increasing number (0, 1, 2, 3, ...) of side-lobes on each side of the main lobe. At what numbers of side-lobes do the reconstructions become better than the nearest-neighbor and linear interpolations?
Explanation / Answer
matlab code is asfollow
u=10 ; %range signal from 0 to 10
n= 3 % number of bits
q=u / 2n-1 % quantization interval
t = 0:0.1:10; % your time vector
Y = abs( cos 60 pi t) % your signal
% ..........convert to a digital signal ......
a= fix (y/q) ;
yd = dec 2bin (a,n)
% you can calculate the signal yq.......
yq =a *q
plot ( t, y , "r")
hold on
plot (t , yq , g )
hold off
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.