Documente Academic
Documente Profesional
Documente Cultură
n=0, 1,..N-1
(1.1)
1. INTRODUCTION
FFT is simply an algorithm (i.e., a particular method of
performing a series of computations) that can compute the
discrete Fourier transform much more rapidly than other
available algorithms. For this reason, our discussion of the FFT
addresses only the computational aspect of the algorithm. A
DFT decomposes a sequence of values into components of
different frequencies. This operation is useful in many fields
(see discrete Fourier transform for properties and applications
of the transform) but computing it directly from the definition
is often too slow to be practical. An FFT is a way to compute
the same result more quickly: computing a DFT of N points in
the obvious way, using the definition, takes O(N 2) arithmetical
operations, while an FFT can compute the same result in only
O(N log N) operations.
The difference in speed can be substantial, especially for long
data sets where N may be in the thousands or millionsin
practice, the computation time can be reduced by several orders
of magnitude in such cases, and the improvement is roughly
proportional to N/log(N). This huge improvement made many
DFT-based algorithms practical; FFTs are of great importance
to a wide variety of applications, from digital signal processing
and solving partial differential equations to algorithms for
quick multiplication of large integers. A simple matrixfactoring example is used to intuitively justify the FFT
algorithm. The factored matrices are alternatively represented
by signal flow graphs. From these graphs, we construct the
logic of an FFT computer program theoretical development of
various forms of the FFT algorithm.
2. MATRIX FORMULATION
The discrete Fourier transform is given by:
Figure (b)
STEPS INVOLVING IN THE COMPUTATION OF THE
FFT:
The FFT of an input sequence of N samples is given by
X(n)= WP x(k)
(1.5)
Here X(n ) is the FFT, WP is the twiddle factor and x(k) is the
value of the input sequence.
For the computation of the above equation the value of the
Twiddle Factor must be known
WP = e-j2p/N
The value of p is determined by following the steps as
explained under:
(a) Writing the index k in binary form with bits where is the
power of 2 corresponding to the value of N.
(b) Scaling or sliding this binary number -l bits to the right and
filling in the newly opened bit position on the left with zeros,
Here l is the value determining the computational array which
varies from 1 to .
(c) Then reversing the order of the bits. This bit reversed
number is then converted to decimal. This number is the value
of p.
After the calculation of the values of X(n) the values are
unscrambled as they are obtained in reversed order according to
the Cooley tukey algorithm.
To unscramble the output the vector X(n) is to write n in
binary and reverse or flip the binary number. We show in fig
(a)_ the results of this bit reversing operation : terms x(k) and
x(i) have been interchanged , where I is the integer obtained by
bit reversing the integer k.
Note that a situation occurs when we encounter a node that has
previously been interchanged. For example in Fig (b1) node
k=0 remains in its location, nodes k=1, 2, 3 are interchanged
with nodes 8, 4 and 12 respectively. The next node to be
considered is node 4, but this node was previously been
interchanged with node 2. to eliminate the possibility of
considering a node that has previously been interchanged, we
simply check to see if i(the integer obtained by bit reversing k)
is less than k. if so, this implies that the node has been
interchanged by a previous operation . With this check, we can
ensure a straight forward unscrambling procedure.
Considering the input sequence of 16 elements
Figure (b1)
Figure (c) represents the flowchart of the computer
programming. Box1 describes the necessary input data. Data
Figure(c)
Box3 checks to see if the array l to be computed is greater than
. If yes, then the program branches to box23 to unscramble the
computed results by bit inversion. If all arrays have not been
computed, then we proceed to Box 4. Box 4 sets a counter I=1.
This counter monitors the number of dual node pairs that have
been considered. Since it is necessary to skip certain nodes in
order to ensure that previously considered nodes are not
encountered a second time, Counter I is the control for
determining the when the program must skip. Boxes 5 and 6
perform the computation of eq(1.4). Because k and I have been
initialized to 0 and 1, respectively, the initial node considered is
the first node of the first array. To determine the factor p for
this node, we must first scale the binary number k to the right
by -1 bits. To accomplish this, we compute the integer value
of k/ 2NU1 and set the result to M as shown in box 5. According
to the procedure for determining the p, we must bit reverse M,
where M is represented by = NU bits. The function IBR(M)
denoted by box 5 is a special function routine for bit inversion.
l=l+1;
N2=N2/2;
NU1=NU1-1;
k=0;
end
[y,ic]=bitrevorder(x);
V. Results:
Considering and input sequence of N= 8 samples. The FFT of
the sequence can be calculated using the above function in
MATLAB as shown
x=[1 2 3 4 5 6 7 8]; %%%%Generates an input
sequence%%%%
y= FFT_func(x);%%%% Takes the FFT of the
sequence%%%%
disp(y)%%%%Displays the output%%%%
Then the output is displayed as
Columns 1 through 6
36.0000
-4.0000 + 9.6569i -4.0000 + 4.0000i
4.0000 + 1.6569i
-4.0000
-4.0000 - 1.6569i
Columns 7 through 8
-4.0000 - 4.0000i -4.0000 - 9.6569i
Multidimensional FFTS:
As defined in the multidimensional DFT article, the
multidimensional DFT
transforms an array
(over
, defined as
,
is performed element-wise. Equivalently, it is simply the
composition of a sequence of d sets of one-dimensional DFTs,
performed along one dimension at a time (in any order).
This compositional viewpoint immediately provides the
simplest and most common multidimensional DFT algorithm,
known as the row-column algorithm. That is, one simply
performs a sequence of d one-dimensional FFTs (by any of the
above algorithms): first you transform along the n1 dimension,
then along the n2 dimension, and so on (or actually, any
ordering will work). This method is easily shown to have the
usual O(NlogN) complexity, where
is the total number of data points transformed. In particular,
there are N / N1 transforms of size N1, etc., so the complexity of
the sequence of FFTs is:
In
dimensions, the
can be viewed as an
matrix, and this algorithm corresponds to first
performing the FFT of all the rows and then of all the columns
(or vice versa), hence the name.
two
y=x(k+1,:);
x(k+1,:)=FFT_func(y);
end
for m=0:C-1 %%%%%Column wise FFT%%%%%
y(1,:)=x(:,m+1);
x(:,m+1)=FFT_func(y);
end
%%%%%%Display the output%%%%%
disp(x);
Output:
Let us consider an input sequence of dimension 4x4. Then the
2D-FFT of the sequence can be calculated by:x=[1 2 3 4;1 2 3 4;1 2 3 4;1 2 3 4] %%%%%Generation of a
4x4 matrix%%%%%
y=FFT2_func(x); %%%%%Computation of 2D FFT%%%%%
disp(y) %%%%%Display the output%%%%%
Then the output will be shown as:
40.00
0
0
0
This gives us the output. Hence we can see that for the
computation of 2D- FFT we take the 1D-FFT twice.
Code For 2D-FFT Function:
The code for a 2D FFT function is generated in MATLAB is
shown below.
function x =FFT2_func(x)
a=size(x);
R=a(1);
C=a(2);
for k=0:R-1
%%%%%Row wise FFT%%%%%
-8.00
0
0
-8.00 - 8.00i
0
0
VI. Conclusion:
Comparison between DFT and FFT Computation Speeds:
-8.00 + 8.00i
0
0
0
128
0.2187s
0.0312s
256
0.5781s
0.0625s
512
2.1094s
0.09375s
Table 1
Here N is the number of input samples.
From table 1 we can see that for a couple of samples of various
lengths the time taken by normal DFT is higher than the time
taken by FFT.
Thus the speed of FFT is beneficial when large calculations are
required.
REFERENCES
[1] M.S. Alam, O. Perez and M. A. Karim Preprocessed
multiobject joint transform correlators, Appl. Opt. 32(17),
3102-3107(1993).
[2] S. Zhong, j. Jiang, S. Liu, and C. Li. Binary joint transform
correlators based in differential processing of the joint