You are on page 1of 20

REPORT ON THE

DESCRIPTION OF THE
FAST FOURIER
TRANSFORM (FFT)
ALGORITHM AND ITS
APPLICATIONS

NAME: Franck Morel Bene Fankem

ID: 117020990036

Teacher: Fucai Li (李富才)

Date: 30th October 2017

1
Table of Contents

SECTION I………………….………………………………….3

1. Introduction…………………………………………………3

2. The Discrete Fourier Transform.……………………………3

2.1 Disadvantages of the DFT and advantages of FFT…….4

3. The Fast Fourier Transform…………………………………4

3.1 How the Fast Fourier Transform Algorithm Works……4

3.2 Flow diagram of the FFT…….…………………………7

SECTION II……………………………………………………8

1. Decimation in Time (DIT) FFT Algorithm derivation and

description……………………………………………………..8

2. Some Programming examples of Decimation in Time FFT.11

3. Decimation in Frequency (DIF) FFT Algorithm…………..15

3.1Comparism between the DIT and DIF FFT Algorithms.17

4. Some Programming examples of DIF FFT………………..18

SECTION III………………………………………………….19

Applications of the Fast Fourier Transform…………………..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.

DFT enables us to transform operations on sampled signals . DFT


computations can be sped up by splitting the original series into two or
more series. Fast Fourier Transforms offers considerable savings in
computation time and helps boost efficiency in practical situations.

2. The Discrete Fourier Transform

The DFT is in the form of a summation. Summations may be formed in


any arbitrary sequence as long as all elements are summed. By
manipulating the number of elements to sum and the order of summation
a number of “efficient” algorithms can be defined.
The can be defined as follows :

where x(n), n=0, 1, . . . , N-1 is a uniformly sampled sequence, T is


sampling interval. WN =exp(-j2pi/N) is the N-th root of unity, and
X F (k), k = 0, 1, . . . , N 1 is the k-th DFT coefficient. j=  1 .

3
2.1 Disadvantages of the DFT and advantages of FFT

 In general the fast algorithms reduce the computational complexity of


an N-point DFT to about Nlog2N complex arithmetic operations.
 There are reduced storage requirements and
 Reduced computational error due to finite bit length arithmetic
(multiplication/division, and addition/subtraction.

3. The Fast Fourier Transform

The FFT is an algorithm for efificient computation of the DFT.

Direct computation of an N-point DFT requires nearly O( N 2 ) complex


arithmetic operations. An arithmetic operation implies a multiplication
and an addition. However, this complexity can be significantly reduced
by developing efficient algorithms. The key to this reduction in
computational complexity is that in an (N x N) DFT matrix of the
N 2 elements, only N elements are distinct. These algorithms are denoted
as FFT (fast Fourier transform) algorithms. Several techniques are
developed for the FFT.

3.1 How the Fast Fourier Transform Algorithm Works

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

The FFT operates by decomposing an N point time domain signal into N


time domain signals each composed of a single point.

4
STEP 2

Then we calculate the N frequency spectra corresponding to these N time


domain signals.

STEP 3

Lastly, the N spectra are synthesized into a single frequency spectrum.

Figure 1

Figure 1 shows an example of the time domain decomposition used in the


FFT. In this example, a 16 point signal is decomposed through four
separate stages. The first stage breaks the 16 point signal into two
signals each consisting of 8 points. The second stage decomposes the
data into four signals of 4 points. This pattern continues until there are N
signals composed of a single point. An interlaced decomposition is used
each time a signal is broken in two, that is, the signal is separated into its
even and odd numbered samples. Actually there are Log 2 N stages
required in this decomposition, i.e., a 16 point signal ( 2 4 ) requires 4
stages, a 512 point signal ( 27 ) requires 7 stages, a 4096 point signal ( 212 )
requires 12 stages, etc.

The decomposition is nothing more than a reordering of the samples in


the signal.

5
Figure 2

Figure 2 shows the rearrangement pattern required. The important idea is


that the binary numbers are the reversals of each other. For example,
sample 3 (0011) is exchanged with sample number 12 (1100). Likewise,
sample number 14 (1110) is swapped with sample number 7 (0111), and
so forth.

The FFT time domain decomposition is usually carried out by a bit


reversal sorting algorithm. This involves rearranging the order of the N
time domain samples by counting in binary with the bits flipped
left-for-right (such as in the far right column in Figure 2).

6
3.2 Flow diagram of the FFT

7
SECTION II

1. Decimation in Time (DIT) FFT Algorithm derivation and


description

The radix-2 algorithms are the simplest FFT algorithms.The radix-2


decimation-in-frequency and decimation-in-time1 fast Fourier transforms
(FFTs) are the simplest FFT algorithms.

Based on the Cooley-Tukey Algorithm:

To begin the formulation, separate the processing into even and odd
sequences:

This is equivalent to the computation of two periodic N/2 point


transforms, with a “twiddle factor” multiplication of the second transform.
If this equation is used for the first N/2 frequency bins, the second N/2
bins may be computed as:

8
Noticing the sign difference between the solutions, we have

Where:

The following diagram shows these operations (a DIT butterfly


computation):

Note that for a two-point FFT, this is all that is required.


Now we have achieved the following structure.

By repeating the even and odd separation of the X0 and X1 computation


elements, each of these pieces and be reduced in size from N/2 to N/4
followed by a 2-element combiner.

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 )

could be defined as:

And

Where

Combining this concept to generate a 4-point FFT, we have:

10
Escalating this for an 8-point FFT, we have :

2. Some Programming examples of Decimation in Time FFT

**these examples were computed using SCILAB software.

/ Example 1
// Program to FFT of a sequence using DIT

x = [82 44 62 79 92 74 18 41];

//"decimate" x(n) in time:


x0 = x(1:2:8);x1 = x(2:2:8);

//Take the half-length DFTs:


X0 = fft(x0);X1 = fft(x1);

//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 )=

492. -58.085047 - 49.641654i 94.001264 + 1.9999996i


38.077875 + 38.297548i

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

**To verify that this gives the DFT of x(n), we compute :

--> y=fft(x)
--> disp (y)

The result is:


column 1 to 5

492. -58.083261 - 49.656854i 94. + 2.i 38.083261 + 38.343146i

column 6 to 8

16. 38.083261 - 38.343146i 94. - 2.i -58.083261 + 49.656854i

// 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

2. 0.5 - 1.2071068i 0. 0.5 - 0.2071068i 0.

column 6 to 8

0.5 + 0.2071068i 0. 0.5 + 1.2071068i

// 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

X2 = fft (x2 , -1);


disp(X2, "X2( k ) = " );

Result Example 5

X2( k ) =
column 1 to 5

7. -0.7071068 - 0.7071068i -i 0.7071068 - 0.7071068i 1.

column 6 to 8

0.7071068 + 0.7071068i i -0.7071068 + 0.7071068i

14
3. Decimation in Frequency(DIF) FFT Algorithm

As previously said, the radix-2 algorithms are the simplest FFT


algorithms. The decimation-in-frequency (DIF) radix-2 FFT partitions the
DFT computation into even-indexed and odd-indexed outputs, which can
each be computed by shorter-length DFTs of di erent combinations of
input samples. Recursive application of this decomposition to the
shorter-length DFTs results in the full radix-2 decimation-in-frequency
FFT.

The radix-2 decimation-in-frequency algorithm rearranges the discrete


Fourier transform (DFT) equation into two parts: computation of the
even-numbered discrete-frequency indices X (k) for k = [0, 2, 4, . . . ,
N − 2] (or X (2r) as seen below:

and computation of the odd-numbered indices k = [1, 3, 5, . . . , N − 1]


(or X (2r + 1) as seen below:

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

called a decimation in frequency because the frequency samples are


computed separately in alternating groups, and a radix-2 algorithm
because there are two groups. Figure 3 graphically illustrates this form of
the DFT computation. This conversion of the full DFT into a series of
shorter DFTs with a simple preprocessing step gives the
decimation-in-frequency FFT its computational savings.

15
Figure 3: Decimation in frequency of a length-N DFT into two length-N2 DFTs preceded by a prepro-
cessing stage.

The initial combining operations for both short-length DFTs involve


parallel groups of two time samples, x (n) and x (n + N/2). One of these
so-called butterfly operations is illustrated in Figure 4. There are N/2
butterflies per stage, each requiring a complex addition and subtraction
2 n ( pi )
(i
followed by one twiddle-factor multiplication by W  e n
N
N
on the
lower output branch.

Figure 4: DIF butterfly: twiddle factor after length-2 DFT

It is also worth noting that this butterfly differs from the


decimation-in-time radix-2 butterfly in that the twiddle factor
multiplication occurs after the combining.

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.

Figure 5: Radix-2 decimation-in-frequency FFT for a length-8 signal

3.1 Comparism between the DIT and DIF FFT Algorithms

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

28. -4. + 9.6568542i -4. + 4.i -4. + 1.6568542i -4.


column 6 to 8

-4. - 1.6568542i -4. - 4.i -4. - 9.6568542i

18
SECTION III

Some Applications of Fast Fourier Transforms

1. Signal Processing

The Fast Fourier Transform is extensively used in the field of Signal


Processing. It can for example be used to improve the quality of a signal.
If we assume that we are listening to a recording, and there is a
low-pitched hum in the background. By applying a low-frequency filter,
we can eliminate the hum.

2. Image Processing

FFT can also be applied to Image processing. It could be used to remove


some undesired features on a photograph and it could as well help us to
resize a picture.

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.

4. To Solve Partial Differential Equations


FFT could also be used to solve some partial differential equations at a
faster rate. Some FFT algorithms have for example been used to solve the
heat equation in high dimensions like 3D not just 2D or 1D.

19
References

[1] The Scientist and Engineer's Guide to Digital Signal Processing,


chapter 12
[2] Decimation-in-Frequency (DIF) Radix-2 FFT, by Douglas L. Jones.

[3] Scilab Textbook Companion for Digital Signal Processing by R.


Babu.

[4] Proakis and Manolakis, Digital Signal Processing: Principles,


Algorithms, and Applications, 4th Ed., Prentice Hall, 2007. ISBN:
0-13-187374-1., chapter 8

[5] Fast Fourier Transform: Algorithms and Applications, K.R. Rao l


D.N. Kim l, J.J. Hwang.

20

You might also like