Signals and Systems: DT e T X F X
Signals and Systems: DT e T X F X
Signals and Systems: DT e T X F X
Lab #09
Name: ____________________________________________Roll No: ______________
Objectives:
To understand the basic concept behind Fourier transforms.
To verify the Amplitude density and Phase spectra of continuous time signals
using Matlab
To observe the practical implication of the fact that all the signals are actually
time-limited.
To become familiar with FFT and IFFT functions of Matlab that are used for DFT
Equipments:
An IBM compatible PC
Matlab Software
And its inverse is known as Inverse Fourier Transform, and that is given by
X ( f )e
j 2ft
x (t ) dt
But since the signals generated by Matlab are discrete-time signals, we’ll use following discrete-
time equivalent of the above equation:
X mf T x nT e j 2 mf nT
n
Where T represents the distance (in sec) between any two samples on the time- axis, n is an
integer that represents the sample index in the time-domain. The outcome of all this computation
is obviously also discrete, hence, m is an integer that represents the sample index in the frequency
domain f represents the distance (in Hz) between any two samples on the frequency axis.
The above two equations will provide same results for very small values of T (sample spacing).
Phase Spectrum
The Phase Spectrum of a continuous time signal x(t) is angle of its Fourier Transform
X(f), i.e., X(f). Its unit is radians.
The energy density of a continuous time signal x (t) is the square of its amplitude density
function, i.e., |X (f) |2. Accordingly, its unit is square of that of |X (f)|.
Example:
1. First of all, we’ll see the spectra of signal x(t) = e-tu(t) i-e amplitude, and phase
spectra.
The Fourier transform of the above signal, i.e. x(t)=e-t u(t), is given by:
1
X( f )
1 j 2f
subplot(1,2,1)
plot(t, xt);
xlabel('TIME');
ylabel('Amplitude');
title('your roll no: ')
grid on;
subplot(1,2,2)
plot(f, xamp)
xlabel('FREQUENCY');
ylabel('Amplitude Spectrum');
title('Isra')
grid on;
Result:
ylabel('Your University');
title('Phase');
grid on;
Result:
Example:
2. Write a simple program to Demonstrate DFT
x=[1 4 2 1];
n=0:3;
a=fft(x);
m=abs(a);
ang=angle(a);
subplot(3,1,1);
stem(n,x)
grid on;
title('x(n)')
subplot(3,1,2);
stem(n,m)
grid on;
title('amp')
subplot(3,1,3);
stem(n,ang)
grid on;
title ('phase')
Result:
Excercise:
1. Verify the results of example number 1 using FFT function,write code below
and attach the results.
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
2. consider the following code, type it in Matlab ,attach the result and write
your observation below
n=0:3;
a=ifft(x);
stem(n,a)
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________