##### Personal tools
•
You are here: Home Homework Eleven

# Homework Eleven

##### Document Actions
• Reading: Chapter 5, Chapter 10
• Homework:
1. Problem 5.1-5
2. Problem 5.1-9
3. Problem 5.1-10
4. Problem 10.6-6
5. This exercise is to be in conjunction with M ATLAB .

Let . This is not a bandlimited signal. Let . In this problem you will explore the DFT for various combinations of sampling rates and zero padding.

1. Make a plot of for Hz. (where .) For example,
                  freqrange = 0:.1:5;   % make the range of frequency variables
Xf = 1 ./ sqrt((2*pi*freqrange).^2 + 1);  % magnitude Fourier tranform
plot(freqrange,Xf);             % plot F.T.

You should overlay this plot over every spectrum computed below for comparison.
2. Let be the sampling interval (i.e., ). Let , and sample 128 points of the function. Then plot the FFT of the sampled data:
                  N0=128;  % number of sample points
T = 0.1; % sample interval
Fs = 1/T; % sample rate
k = (0:(N0-1));  % index range
k_2 = (0:(N0/2-1));  % half the points
x = T*exp(-(k*T));   % the sampled function.  (Scale by T)
xout = fft(x,N0);    % compute the FFT
plot(k_2*Fs/N0, abs(xout(1:(N0/2))),'-',freqrange, Xf,':');
% plot sampled spectrum and true spectrum
% Note: the factor fs/N0 converts from bin number to frequency in Hz.

Print the plot. Comment on discrepancies between the true spectrum and the spectrum computed by the DFT.
3. Now try some variations.
1. Take 128 point of data, with zero-pad to 512 points.
2. Take 128 points of data, with .
3. Take 128 points of data, with .
4. Take 512 points of data, with
5. Take 512 points of data, with
Turn in appropriate plots for each variation. Interpret all the results in light of aliasing and spectral leakage.
6. Cyclic convolution. Let
and let
1. Using M ATLAB , find the linear convolution of and :
                  x = ones(1,16);   % set up x data
y = [1 2 3 4 5 6 7 8 7 6 5 4 3 2 1];  % set up y data
z = conv(x,y);    % convolve
stem(0:length(z)-1,z);   % plot the convolved results

2. Now test the convolution theorem by taking transforms of the signals:
                  X = fft(x,32);  % take the DFT of x data
Y = fft(y,32);  % take the DFT of y data
Z = X .* Y;     % Multiply.  .* is point-for-point multiply
znew = real(ifft(Z,32));  % compute the inverse transform
% use real() to get rid of the imaginary part
% (which should be very small)
stem(0:length(znew)-1,znew);  % plot the convolution.

3. Compare the plot from part (a) with the plot from part (b).
4. Now we will examine cyclical convolution by dealing with 16 point FFTs.
                  X1 = fft(x,16);
Y1 = fft(y,16);
Z1 = X1 .* Y1;
z1 = ifft(Z1,16);
stem(0:15, real(z1));

Using cyclical convolution, account for this strange result.
Copyright 2008, by the Contributing Authors. Cite/attribute Resource . admin. (2006, June 14). Homework Eleven. Retrieved January 07, 2011, from Free Online Course Materials — USU OpenCourseWare Web site: http://ocw.usu.edu/Electrical_and_Computer_Engineering/Signals_and_Systems/hw11.html. This work is licensed under a Creative Commons License