Beruflich Dokumente
Kultur Dokumente
INTRODUCTION
The FFT is based on decomposition and breaking the transform into smaller transforms
and combining them to get the total transform. FFT reduces the computation time required to
compute a discrete Fourier transform and improves the performance by a factor of 100 or more
over direct evaluation of the DFT.
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.
The most well known FFT algorithms depend upon the factorization of N, but there are
FFT with O (N log N) complexity for all N, even for prime N. Many FFT algorithms only depend
on the fact that
The Fast Fourier Transform algorithm exploit the two basic properties of the twiddle
factor - the symmetry property and periodicity property which reduces the number of complex
multiplications required to perform DFT.
FFT algorithms are based on the fundamental principle of decomposing the computation
of discrete Fourier Transform of a sequence of length N into successively smaller discrete
Fourier transforms. There are basically two classes of FFT algorithms.
A) Decimation In Time (DIT) algorithm
B) Decimation In Frequency (DIF) algorithm.
In decimation-in-time, the sequence for which we need the DFT is successively divided
into smaller sequences and the DFTs of these subsequences are combined in a certain pattern to
obtain the required DFT of the entire sequence. In the decimation-in-frequency approach, the
frequency samples of the DFT are decomposed into smaller and smaller subsequences in a
similar manner.
The number of complex multiplication and addition operations required by the simple
forms both the Discrete Fourier Transform (DFT) and Inverse Discrete Fourier Transform
(IDFT) is of order N2 as there are N data points to calculate, each of which requires N complex
arithmetic operations.
j 2 nK
N
;
The algorithmic complexity of DFT will O(N2) and hence is not a very efficient method.
If we can't do any better than this then the DFT will not be very useful for the majority of
practical DSP application. However, there are a number of different 'Fast Fourier Transform'
(FFT) algorithms that enable the calculation the Fourier transform of a signal much faster than a
DFT. As the name suggests, FFTs are algorithms for quick calculation of discrete Fourier
transform of a data vector. The FFT is a DFT algorithm which reduces the number of
computations needed for N points from O(N 2) to O(N log N) where log is the base-2 logarithm.
If the function to be transformed is not harmonically related to the sampling frequency, the
response of an FFT looks like a sinc function (sin x) / x.
The Radix-2 DIT algorithm rearranges the DFT of the function xn into two parts: a sum
over the even-numbered indices n = 2m and a sum over the odd-numbered indices n = 2m + 1:
the two sums are the DFT of the even-indexed part x2m and the DFT of odd-indexed part x2m +
1 of the function xn. Denote the DFT of the Even-indexed inputs x2m by Ek and the DFT of the
Odd-indexed inputs x2m + 1 by Ok and we obtain:
However, these smaller DFTs have a length of N/2, so we need compute only N/2
outputs: thanks to the periodicity properties of the DFT, the outputs for N/2 < k < N from a DFT
of length N/2 are identical to the outputs for 0< k < N/2. That is, Ek + N / 2 = Ek and Ok + N / 2
= Ok. The phase factor exp[ 2ik / N] called a twiddle factor which obeys the relation: exp[
2i(k + N / 2) / N] = e iexp[ 2ik / N] = exp[ 2ik / N], flipping the sign of the Ok + N /
2 terms. Thus, the whole DFT can be calculated as follows:
This result, expressing the DFT of length N recursively in terms of two DFTs of size N/2,
is the core of the radix-2 DIT fast Fourier transform. The algorithm gains its speed by re-using
the results of intermediate computations to compute multiple DFT outputs. Note that final
outputs are obtained by a +/ combination of Ek and Okexp( 2ik / N), which is simply a size-2
DFT; when this is generalized to larger radices below, the size-2 DFT is replaced by a larger DFT
(which itself can be evaluated with an FFT).
This process is an example of the general technique of divide and conquers algorithms. In
many traditional implementations, however, the explicit recursion is avoided, and instead one
traverses the computational tree in breadth-first fashion.
The term 'FFT' is actually slightly ambiguous, because there are several commonly used
'FFT' algorithms. There are two different Radix 2 algorithms, the so-called 'Decimation in Time'
(DIT) and 'Decimation in Frequency' (DIF) algorithms. Both of these rely on the recursive
decomposition of an N point transform into 2 (N/2) point transforms.
Number
Complex Multiplications
Complex Multiplication
Speed
of Points,
in Direct computations,
improvement
N2
log2 N
Factor
16
4.0
64
12
5.3
16
256
32
8.0
32
1024
80
12.8
64
4096
192
21.3
128
16384
448
36.6
If r= 2, then if is called as radix-2 FFT algorithm,. The basic DFT is of size of 2. The N
point DFT is decimated into 2 point DFT by two ways such as Decimation In Time (DIT) and
Decimation In Frequency (DIF) algorithm. Both the algorithm take the advantage of periodicity
and symmetry property of the twiddle factor.
j 2nK
W nK e N
N
The radix-2 decimation-in-frequency FFT is an important algorithm obtained by the
divide and conquers approach. The Fig. 1.2 below shows the first stage of the 8-point DIF
algorithm.
The decimation, however, causes shuffling in data. The entire process involves v = log2
N stages of decimation, where each stage involves N/2 butterflies of the type shown in the Fig.
1.3.
Here
W nk e
j 2nk
N
Consequently, the computation of N-point DFT via this algorithm requires (N/2) log2 N
complex multiplications. For illustrative purposes, the eight-point decimation-in frequency
algorithm is shown in the Figure below. We observe, as previously stated, that the output
sequence occurs in bit-reversed order with respect to the input. Furthermore, if we abandon the
requirement that the computations occur in place, it is also possible to have both the input and
output in normal order. The 8 point Decimation In frequency algorithm is shown in Fig 1.5.
CHAPTER 2
CHAPTER 2
2.1 INTRODUCTION
Hardware Description Language (HDL) is a language that can describe the behavior and
structure of electronic system, but it is particularly suited as a language to describe the structure
and the behavior of the digital electronic hardware design, such as ASICs and FPGAs as well as
conventional circuits. HDL can be used to describe electronic hardware at many different levels
of abstraction such as Algorithm, Register transfer level (RTL) and Gate level. Algorithm is un
synthesizable, RTL is the input to the synthesis, and Gate Level is the input from the synthesis. It
is often reported that a large number of ASIC designs meet their specification first time, but fail
to work when plunged into a system. HDL allows this issue to be addressed in two ways, a HDL
specification can be executed in order to achieve a high level of confidence in its correctness
before commencing design and may simulate one specification for a part in the wider system
context(Eg:- Printed
One can verify functionality early in the design process and immediately simulate the
design written as a HDL description. Design simulation at this high level, before
implementation at the Gate Level allows testing architectural and designing decisions.
FPGA synthesis provides logic synthesis and optimization, so one can automatically
convert a VHDL description to gate level implementation in a given technology.
HDLs typically support a mixed level description where structural or net-list constructs
can be mixed with behavioral or algorithmic descriptions. With this mixed level
capabilities one can describe system architectures at a
implementation.
2.3 VHDL
VHDL is a hardware description language. It describes the behavior of an electronic
circuit or system, from which the physical circuit or system can then be attained.
VHDL is intended for circuit synthesis as well as circuit simulation. However, though
VHDL is fully simulatable, not all constructs are synthesizable. The two main immediate
applications of VHDL are in the field of Programmable Logic Devices and in the field of ASICs
(Application Specific Integrated Circuits). Once the VHDL code has been written, it can be used
either to implement the circuit in a programmable device or can be submitted to a foundry for
fabrication of an ASIC chip.
VHDL program to be incorporated in the design being developed. Because of this generalpurpose nature, it is possible to use VHDL to write a test bench that verifies the functionality of
the design using files on the host computer to define stimuli, interacts with the user, and
compares results with those expected.
The key advantage of VHDL when used for systems design is that it allows the behavior
of the required system to be described (modeled) and verified (simulated) before synthesis tools
translate the design into real hardware (gates and wires). The VHDL statements are inherently
concurrent and the statements placed in a PROCESS, FUNCTION or PROCEDURE are
executed sequentially.
CHAPTER 3
DESIGN OF FFT
The FFT computation is accomplished in three stages. The x(0) until x(15) variables are
denoted as the input values for FFT computation and X(0) until X(15) are denoted as the outputs.
The pipeline architecture of the 16 point FFT is shown in Fig 4.1 consisting of butterfly schemes
in it. There are two operations to complete the computation in each stage.
The upward arrow will execute addition operation while downward arrow will execute
subtraction operation. The subtracted value is multiplied with twiddle factor value before being
processed into the next stage. This operation is done concurrently and is known as butterfly
process.
The implementation of FFT flow graph in the VHDL requires three stages, final
computation is done and the result is sent to the variable Y (0) to Y (15). Equation in each stage
is used to construct scheduling diagram.
For stage one, computation is accomplished in three clock cycles denoted as S0 to S2.The
operation is much simpler compared with FFT. This is because FFT processed both real and
imaginary value. The result from FFT is represented in real and imaginary value because of the
multiplication of twiddle factor. Twiddle factor is a constant defined by the number of point used
in this transform. This scheduling diagram is derived from the equations obtain in FFT signal
flow graph. The rest of the scheduling diagrams can be sketched in the same way as shown in
figure 4.2. Thus each stage requires a clock cycle and totally three clock cycles are needed.
Scheduling diagrams are a part of behavioral modeling and Synthesis steps to translate the
algorithmic description into RTL (register transfer level) in VHDL design.
Imaginary Part I = SX + CY
Using the twiddle factor multiplier that has been developed, it is possible to design a
butterfly processor for a radix-2 Cooley-Tukey FFT. Hence this basic structure of radix-2 FFT
can be used as a building block to construct higher N-point FFTs. This structure has been
developed as an extension to provide for the computation of higher value index FFTs.
SAMPLE OUTPUT