Implementation of FFT of a given sequence
AIM: To implementation of Fast Fourier Transform.
EQUIPMENTS:
Operating System - Windows XP
Constructor - Simulator
Software - CCStudio 3 & MATLAB 7.5
Fast Fourier Transform:
The Fast Fourier Transform (FFT) isa computationally fast way to calculate the DFT.
Determine the Fourier transform of the following sequence. Use the FFT (Fast Fourier
Transform) function, using inbuilt function
x (n) = {4 6 2 1 7 4 8}
MATLAB Code:
%for defined sequence using inbuilt function
n = 0:6;
x = [4 6 2 1 7 4 8];
a = fft(x);
mag = abs(a);
pha = angle(a);
subplot(2,1,1);
plot(mag);
grid on
title('Magnitude Response');
subplot(2,1,2);
plot(pha);
grid on
title('phase Response');
Implementation of FFT of given sequence in matlab n-point fft WITHOUT USING INBUILT FUNCTION
PROGRAM:
clear all;
close all;
clc;
x=input('Enter the sequence x[n]= ');
N=input('Enter the value N point= ');
L=length(x);
x_n=[x,zeros(1,N-L)];
for i=1:N
for j=1:N
temp=-2*pi*(i-1)*(j-1)/N;
DFT_mat(i,j)=exp(complex(0,temp));
end
end
X_k=DFT_mat*x_n';
disp('N point DFT is X[k] = ');
disp(X_k);
mag=abs(X_k);
phase=angle(X_k)*180/pi;
subplot(2,1,1);
stem(mag);
xlabel('frequency index k');
ylabel('Magnitude of X[k]');
axis([0 N+1 -2 max(mag)+2]);
subplot(2,1,2);
stem(phase);
xlabel('frequency index k');
ylabel('Phase of X[k]');
axis([0 N+1 -180 180]);
PROGRAM: for user defined sequence
%fast fourier transform
clc;
clear all;
close all;
tic;
x=input('enter the sequence');
n=input('enter the length of fft'); %compute fft
disp('fourier transformed signal');
X=fft(x,n)
subplot(1,2,1);stem(x); title('i/p signal');
xlabel('n --->');
ylabel('x(n) -->');grid;
subplot(1,2,2);stem(X);
title('fft of i/p x(n) is:');
xlabel('Real axis --->');
ylabel('Imaginary axis -->');grid;
OUTPUT:-
enter the sequence[1 .25 .3 4]
enter the length of fft4
fourier transformed signal
X =
5.5500 0.7000 + 3.7500i -2.9500 0.7000 - 3.7500i
Graph output
RESULT: The Fast Fourier Transform of given sequence is obtained. Hence the theory and practical value are proved.
VIVA QUESTIONS:
? FFT is in complex domain how to use it in real life signals optimally?
? What is the difference between FFT and IFFT?
? Explain using convolution the effects of taking an FFT of a sample with no windowing
? What is the need of FFT ?
? What’s the difference between FFT and DFT?
? Why do we need Fourier transform in DSP?
? Give any practical application of fft in daily life?
? What is the importance of fft in OFDMA technology?
? In STB DVB how many point fft is currently using?
? Give FFT & IFFT formulae and calculate for any sequence?
? What is "decimation-in-time" versus "decimation-in-frequency"?
? What is "bit reversal"?
? How does the FFT work?
-
UpdatedFeb 03, 2020
-
Views5,550
Generation of basic signals using MATLAB
Design of FIR filters of Low pass and high pass filter using Matlab commands
Find DFT / IDFT of given DT signal
Implementation of analog IIR low pass and high pass filter for a given sequence
Implementation of FFT of a given sequence
Find frequency response of a given system given in (Transfer Function/ Differential equation form