Sie sind auf Seite 1von 2

EXPERIMENT – 1

Aim: To find Fourier Transform of given discrete time signal and plot it’s magnitude
and phase response.

Software used: MATLAB R2016a

Theory:

The Discrete Time Fourier Transform (DTFT) is the member of the Fourier transform family
that operates on aperiodic, discrete signals. The best way to understand the DTFT is how it
relates to the DFT. To start, imagine that you acquire an N sample signal, and want to find its
frequency spectrum. By using the DFT, the signal can be decomposed into sine and cosine
waves, with frequencies equally spaced between zero and one-half of the sampling rate. As
discussed in the last chapter, padding the time domain signal with zeros makes the period of
the time domain longer, as well as making the spacing between samples in the frequency
domain narrower. As N approaches infinity, the time domain becomes aperiodic, and the
frequency domain becomes a continuous signal. This is the DTFT, the Fourier transform that
relates an aperiodic, discrete signal, with a periodic, continuous frequency spectrum.

There are many subtle details in these relations. First, the time domain signal, x[n], is still
discrete, and therefore is represented by brackets. In comparison, the frequency domain
signals, ReX(ω) & ImX(ω), are continuous, and are thus written with parentheses. Since the
frequency domain is continuous, the synthesis equation must be written as an integral,
rather than a summation.

X(w) =

3*cos(3*w) - 4*cos(2*w) + 6*cos(4*w) - cos(6*w) + sin(2*w)*4i - sin(3*w)*3i -


sin(4*w)*6i + sin(6*w)*1i + 2*cos(w) - sin(w)*2i + 1

mag_res(w) =

abs(3*cos(3*w) - 4*cos(2*w) + 6*cos(4*w) - cos(6*w) + sin(2*w)*4i - sin(3*w)*3i -


sin(4*w)*6i + sin(6*w)*1i + 2*cos(w) - sin(w)*2i + 1)

ph_res(w) =

atan((2*imag(cos(w)) - 2*real(sin(w)) - 4*imag(cos(2*w)) + 3*imag(cos(3*w)) +


6*imag(cos(4*w)) - imag(cos(6*w)) + 4*real(sin(2*w)) - 3*real(sin(3*w)) -
6*real(sin(4*w)) + real(sin(6*w)))/(2*real(cos(w)) + 2*imag(sin(w)) -
4*real(cos(2*w)) + 3*real(cos(3*w)) + 6*real(cos(4*w)) - real(cos(6*w)) -
4*imag(sin(2*w)) + 3*imag(sin(3*w)) + 6*imag(sin(4*w)) - imag(sin(6*w)) + 1))

Matlab code:
clc;
clear all;
close all;
x=[1 2 -4 3 6 0 -1];
syms w n;
e(n,w)=cos(n*w)-i*sin(n*w);
n=0:1:6;
e(n,w);
X(w)=sum(x.*e(n,w))
mag_res(w)= abs(X(w));
ph_res(w)=atan(imag(X(w))/real(X(w)));
w= -pi:0.05:pi;
subplot(2,1,1);
plot (w,mag_res(w));
subplot(2,1,2);
plot(w,ph_res(w));

Result:

Conclusion:

Thus we have computed the Fourier Transform of given discrete time signal and plotted
it’s magnitude and phase response.

Also verified magnitude response is an even function and phase response is an odd
function.

Das könnte Ihnen auch gefallen