Professional Documents
Culture Documents
DESCRIPTION OF THE
FAST FOURIER
TRANSFORM (FFT)
ALGORITHM AND ITS
APPLICATIONS
ID: 117020990036
1
Table of Contents
SECTION I………………….………………………………….3
1. Introduction…………………………………………………3
SECTION II……………………………………………………8
description……………………………………………………..8
SECTION III………………………………………………….19
References …………………………………………………….20
2
SECTION I
1. Introduction
The Frequency domain information for a signal is very important for
processing. Generally, sinusoids can be represented by phasors. The
Fourier series can be used to represent any periodic signal. The Fourier
transforms are used to transform signals from time to frequency domain,
from frequency to time domain.
3
2.1 Disadvantages of the DFT and advantages of FFT
In complex notation, the time and frequency domains each contain one
signal made up of N complex points. Each of these complex points is
composed of two numbers, the real part and the imaginary part. each
complex variable holds two numbers. When two complex variables are
multiplied, the four individual components must be combined to form the
two components of the product. The FFT algorithm can be resumed in
three steps as folllows:
STEP 1
4
STEP 2
STEP 3
Figure 1
5
Figure 2
6
3.2 Flow diagram of the FFT
7
SECTION II
To begin the formulation, separate the processing into even and odd
sequences:
8
Noticing the sign difference between the solutions, we have
Where:
9
IF we consider the second to last stage of a larger transform, it is
concerned strictly with forming X O (K ) and X 1 ( K ) . Using the same
concept, X O (K ) and X 1 ( K )
And
Where
10
Escalating this for an 8-point FFT, we have :
/ Example 1
// Program to FFT of a sequence using DIT
x = [82 44 62 79 92 74 18 41];
//define constants
i = sqrt(-1);
N = 8;W = exp(2*pi/N*i);
k = [0:N/2-1];
X=X0+W.^(-k).*X1;
disp(X, "X( z 1) = " );
11
Result Example 1
X( z1 )=
Computing:
--> X=X0-W.^(-k).*X1;
disp(X, "X( z 2) = " );
yields:
X( z2 )=
16. 38.085047 - 38.358346i 93.998736 - 1.9999996i
-58.077875 + 49.702452i
--> y=fft(x)
--> disp (y)
column 6 to 8
// Example 2
// Program to Compute the 4−p o i n t DFT o f a Sequence
x[ n ]=[1 , −1 ,1 , −1]
// u s i n g DIT Algorithm .
clc ;
x=[1,-1,1,-1];
//FFT Computation
X =fft (x , -1);
disp(X, "X( z ) =" );
12
Result Example 2
X( z ) =
0. 0. 4. 0.
// Example 3
// Program to compute the one dimensional DFT of a cosine function
x=0:63;
y=cos(2*%pi*x/16);
yf=fft(y,-1);
plot(x, real(yf));
Result Example 3
// Example 4
// Program to Compute the 8−p o i n t DFT o f a Sequence
//x [ n ] = [ 0 . 5 , 0 . 5 , 0 . 5 , 0 . 5 , 0 , 0 , 0 , 0 ] u s i n g radix −2 DIF
Algorithm
clc ;
x=[0.5,0.5,0.5,0.5,0,0,0,0];
//FFT Computation
X = fft (x , -1);
disp(X, "X( z ) =" );
13
Result Example 4
X( z ) =
column 1 to 5
column 6 to 8
// Example 5
// Program to Evaluate and Compare the 8−p o i n t DFT o f
the g i v e n Sequence
//x2 [ n ]=1 , 0<=n<=6 u s i n g DIT−FFT Algorithm
clc ;
x2=[1,1,1,1,1,1,1,0];
//FFT Computation
Result Example 5
X2( k ) =
column 1 to 5
column 6 to 8
14
3. Decimation in Frequency(DIF) FFT Algorithm
The mathematical simplications in X(2r) and X(2r+1) reveal that both the
even-indexed and odd-indexed frequency outputs X (k) can each be
computed by a length-N/2 DFT. The inputs to these DFTs are sums or
differences of the first and second halves of the input signal, respectively,
where the input to the short DFT producing the odd-indexed frequencies
2 k ( pi )
(i
is multiplied by a so-called twiddle factor term Wk e . This is
N
15
Figure 3: Decimation in frequency of a length-N DFT into two length-N2 DFTs preceded by a prepro-
cessing stage.
16
The same radix-2 decimation in frequency can be applied recursively to
the two length-N2 DFT7s to save additional computation. When
successively applied until the shorter and shorter DFTs reach length-2,
the result is the radix-2 decimation-in-frequency FFT algorithm.
The DIT and DIF radix-2 FFT algorithms are very similar.
The DIT and DIF radix-2 FFT algorithms have the same complexity.
Both can be implemented in-place.
For the DIT FFT, x[n] is in bit-reversed order, X[k] is in normal
order.
For the DIF FFT, X[k] is in bit-reversed order, x[n] is in normal
order.
The DIT FFT algorithm requires a bit-reversal prior to the in-place
flowgraph, while the DIF FFT algorithm requires a bit-reversal after
the in-place flowgraph.
17
4. Some Programming examples of Decimation in Frequency
FFT
// Example 6
// Program to Compute the DFT o f g i v e n Sequence
//x [ n]= cos ( n∗ p i /2) , and N=4 u s i n g DIF−FFT Algorithm .
clc ;
N=4;
pi=22/7;
n=0:1:N-1;
x =cos(n*pi/2);
//FFT Computation
X = fft (x , -1);
disp(X, "X( z ) = " );
Result Example 6
X( z ) =
0.0012653
1.9999992 + 0.002529i
-0.0012637
1.9999992 - 0.002529i
// Example 7
// Program to Compute the 8−p o i n t DFT o f g i v e n
Sequence
//x [ n ] = [ 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 ] u s i n g DIF , radix −2,FFT
Algorithm .
clc ;
x = [0,1,2,3,4,5,6,7];
//FFT Computation
X = fft (x , -1);
disp(X, "X( z ) = " );
Result Example 7
X( z ) =
column 1 to 7
18
SECTION III
1. Signal Processing
2. Image Processing
3. Data Compression
FFT algorithm can also be used to reduce the size of large data
to store it. Typically, easy-to-use encoding methods require data
files about twice as large as actually needed to represent the
information. Data compression is the general term for the
various algorithms and programs developed to address this
problem. FFT is one of the efficient tools used to address such
issues.
19
References
20