Homework Eleven
 Reading: Chapter 5, Chapter 10

Homework:
 Problem 5.15
 Problem 5.19
 Problem 5.110
 Problem 10.66

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.

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.

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:(N01)); % index range k_2 = (0:(N0/21)); % 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. 
Now try some variations.
 Take 128 point of data, with zeropad to 512 points.
 Take 128 points of data, with .
 Take 128 points of data, with .
 Take 512 points of data, with
 Take 512 points of data, with

Make a plot of
for
Hz. (where
.) For example,

Cyclic convolution. Let

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

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 pointforpoint 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.
 Compare the plot from part (a) with the plot from part (b).

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.

Using M
ATLAB
, find the linear convolution of
and
:
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