You are on page 1of 5

Lab No.

09

Fast Fourier Transform and Inverse Fourier Transform of Continuous time signals
Lab. Objective:

1. To obtain simulation knowledge of Fast Fourier transforms.


2. How to transform signals from time domain to frequency domain.

Tools: PC, Matlab.

Theory:

Fast Fourier Transform:

Fast Fourier Transform is used to transform a continuous time signal from time domain to frequency
domain for the complete knoldege of signal properties/ characteristics.

Inverse Fast Fourier Transform

Inverse Fast Fourier Transform is used to retransform a signal from frequency domain to time domain.

Fourier Transform of Sine waveform:

Matlab code:

%% fourier transform of sine waveform%%

t=0:.01:10;%defining time for signal

A=20;%defining amplitude of signal

f=2;%defining frequency of signal

y=A*sin(4*pi*f*t);%defining sine signal

subplot(2,1,1);% Matlab built-inn command for multi plotting

plot(t,y)%plotting sine signal

legend('input sine waveform')%Matlab built inn command for labelling

grid on %Matlab built inn command for lines

z=fft(y)%defining fourier transform of signal

subplot(2,1,2);% Matlab built-inn command for multi plotting

plot(z)%plotting resultant signal


legend('resultant signal in f-domain')%Matlab built inn command for labelling

grid on%Matlab built inn command for lines

20
input sine waveform
10

-10

-20
0 1 2 3 4 5 6 7 8 9 10

4
x 10
1
resultant signal in f-domain
0.5

-0.5

-1
-200 0 200 400 600 800 1000 1200 1400

Figure 1: Fourier Transform of Sine Signal

Fast Fourier Transform of Cosine waveform

Matlab Code:

%% fourier transform of cosine waveform%%

t=0:.01:10;%defining time for signal

A=10;%defining amplitude of signal

y=A*cos(4*pi*t);%defining cosine signal

subplot(2,1,1);% Matlab built-inn command for multi plotting

plot(t,y)%plotting sine signal

legend('input cosine waveform')%Matlab built inn command for labelling

grid on %Matlab built inn command for lines

z=fft(y)%defining fourier transform of signal

subplot(2,1,2);% Matlab built-inn command for multi plotting


plot(z)%plotting resultant signal

legend('resultant signal in f-domain')%Matlab built inn command for labelling

grid on%Matlab built inn command for lines

10
input cosine waveform
5

-5

-10
0 1 2 3 4 5 6 7 8 9 10

400
resultant signal in f-domain
200

-200

-400
-1000 0 1000 2000 3000 4000 5000

Figure 2: Fourier Transform of Cosine signal

Fast Fourier Transform of Unit Impulse/ Delta function

Matlab Code:

%% fourier transform of delta function%%

N=30;%defining limit for time interval

t=-N:1:N;%defining time for function

y=[zeros(1,N) 1 zeros(1,N)];%defining delta function

subplot(2,1,1);% Matlab built-inn command for multi plotting

plot(t,y)%plotting delta function

legend('input delta function')%Matlab built inn command for labelling

grid on %Matlab built inn command for lines

z=fft(y)%defining fourier transform of delta function


subplot(2,1,2);% Matlab built-inn command for multi plotting

plot(z)%plotting resultant function

legend('resultant function in f-domain')%Matlab built inn command for labelling

grid on%Matlab built inn command for lines

1
input delta function
0.8

0.6

0.4

0.2

0
-30 -20 -10 0 10 20 30

1
resultant function in f-domain
0.5

-0.5

-1
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1

Figure 3: Fourier Transform of Delta function

Inverse Fast Fourier Transform of Delta Function

Matlab Code

%% fourier transform of delta function%%

N=30;%defining limit for time interval

t=-N:1:N;%defining time for function

y=[zeros(1,N) 1 zeros(1,N)];%defining delta function

subplot(3,1,1);% Matlab built-inn command for multi plotting

plot(t,y)%plotting delta function

legend('input delta function')%Matlab built inn command for labelling

grid on %Matlab built inn command for lines


z=fft(y)%defining fourier transform of delta function

subplot(3,1,2);% Matlab built-inn command for multi plotting

plot(z)%plotting resultant function

legend('resultant function in f-domain')%Matlab built inn command for labelling

grid on%Matlab built inn command for lines

i=ifft(z);%defining inverse fourier transform of function

subplot(3,1,3);% Matlab built-inn command for multi plotting

plot(i)%plotting resultant inverse function

legend('resultant function in f-domain')%Matlab built inn command for labelling

grid on%Matlab built inn command for lines

1
input delta function

0.5

0
-30 -20 -10 0 10 20 30
1
resultant function in f-domain

-1
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
1
resultant function in f-domain
0.5

-0.5
0 10 20 30 40 50 60 70

Figure 4: Inverse Fourier Transform of Delta function

Lab. Assignment:

Apply following Transforms on square signal.

1. Fast Fourier Transform


2. Inverse Fast Fourier Transform

You might also like