FFT Module
FFT Module
asia 1
UNIT 4
RADIX-2 FFT ALGORITHM FOR THE COMPUTATION OF DFT AND
IDFT
4.1 Introduction:
Standard frequency analysis requires transforming time-domain signal to frequency
domain and studying Spectrum of the signal. This is done through DFT computation. N-point
DFT computation results in N frequency components. We know that DFT computation
through FFT requires N/2 log2N complex multiplications and N log2N additions. In certain
applications not all N frequency components need to be computed (an application will be
discussed). If the desired number of values of the DFT is less than 2 log2N than direct
computation of the desired values is more efficient that FFT based computation.
4.2 Radix-2 FFT
Useful when N is a power of 2: N = rv for integers r and v. ‘r’ is called the radix, which
comes from the Latin word meaning .a root, and has the same origins as the word radish.
When N is a power of r = 2, this is called radix-2, and the natural .divide and conquer
approach. is to split the sequence into two sequences of length N=2. This is a very clever trick
that goes back many years.
4.2.1 Decimation in time
Now, let us split X(k) into the even and odd-numbered samples. Thus we obtain
The computation of the sequences g1 (n) and g2 (n) and subsequent use of these
sequences to compute the N/2-point DFTs depicted in fig we observe that the basic
computation in this figure involves the butterfly operation.
The computation procedure can be repeated through decimation of the N/2-point DFTs,
X(2k) and X(2k+1). The entire process involves v = log2 N of decimation, where each stage
involves N/2 butterflies of the type shown in figure 4.3.
This algorithm exploits periodicity property of the phase factor. Consider the DFT definition
N 1
X (k ) x(n)WNnk (1)
n 0
WN kN
Since is equal to 1, multiplying both sides of the equation by this results in;
N 1 N 1
X (k ) WN kN x(m)WNmk x(m)WN k ( N m ) (2)
m 0 m 0
Where yk(n) is the out put of a filter which has impulse response of hk(n) and input x(n).
The output of the filter at n = N yields the value of the DFT at the freq ωk = 2πk/N
The above form of filter response shows it has a pole on the unit circle at the frequency ωk =
2πk/N.
Entire DFT can be computed by passing the block of input data into a parallel bank of N
single-pole filters (resonators)
The above form of filter response shows it has a pole on the unit circle at the frequency ωk =
2πk/N.
Entire DFT can be computed by passing the block of input data into a parallel bank of N
single-pole filters (resonators)
From the frequency response of the filter (eq 6) we can write the following difference
equation relating input and output;
Yk ( z ) 1
H k ( z)
X ( z ) 1 WN k z 1
y k (n) WN k y k (n 1) x(n) y k (1) 0 (7)
The desired output is X(k) = yk(n) for k = 0,1,…N-1. The phase factor appearing in the
difference equation can be computed once and stored.
The form shown in eq (7) requires complex multiplications which can be avoided
doing suitable modifications (divide and multiply by 1 WNk z 1 ). Then frequency response of
the filter can be alternatively expressed as
1 WNk z 1
H k ( z) (8)
1 2 cos(2k / N ) z 1 z 2
This is second –order realization of the filter (observe the denominator now is a second-order
expression). The direct form realization of the above is given by
The recursive relation in (9) is iterated for n = 0,1,……N, but the equation in (10) is computed
only once at time n =N. Each iteration requires one real multiplication and two additions.
Thus, for a real input sequence x(n) this algorithm requires (N+1) real multiplications to yield
X(k) and X(N-k) (this is due to symmetry). Going through the Goertzel algorithm it is clear
that this algorithm is useful only when M out of N DFT values need to be computed where M≤
2log2N, Otherwise, the FFT algorithm is more efficient method. The utility of the algorithm
completely depends on the application and number of frequency components we are looking
for.
4.2.1 Introduction:
1. Obtain samples of z-transform on a circle of radius ‘a’ which is concentric to unit circle
The possible solution is to multiply the input sequence by a-n
2. 128 samples needed between frequencies ω = -π/8 to +π/8 from a 128 point sequence
From the given specifications we see that the spacing between the frequency samples is
π/512 or 2π/1024. In order to achieve this freq resolution we take 1024- point FFT of
the given 128-point seq by appending the sequence with 896 zeros. Since we need
only 128 frequencies out of 1024 there will be big wastage of computations in this
scheme.
N 1
X ( z k ) x(n) z k n k 0,1,......L 1 (11)
n 0
Where zk is a generalized contour. Zk is the set of points in the z-plane falling on an arc which
begins at some point z0 and spirals either in toward the origin or out away from the origin such
that the points {zk}are defined as,
Note that,
a. if R0< 1 the points fall on a contour that spirals toward the origin
d.If r0=1 and R0=1 the contour is an arc of the unit circle.
(Additionally this contour allows one to compute the freq content of the sequence x(n) at
dense set of L frequencies in the range covered by the arc without having to compute a large
DFT (i.e., a DFT of the sequence x(n) padded with many zeros to obtain the desired resolution
in freq.))
e. If r0= R0=1 and θ0=0 Φ0=2π/N and L = N the contour is the entire unit circle similar to the
standard DFT. These conditions are shown in the following diagram.
By substitution of
1 2
nk
( n k 2 ( k n) 2 ) (15)
2
we can express X(zk) as
N 1
y ( k ) g ( n) h( k n) (17)
n 0
both g(n) and h(n) are complex valued sequences
If R0 =1, then sequence h(n) has the form of complex exponential with argument ωn =
n2Φ0/2 = (n Φ0/2) n. The quantity (n Φ0/2) represents the freq of the complex exponential
signal, which increases linearly with time. Such signals are used in radar systems are called
chirp signals. Hence the name chirp z-transform.
Y1(k) = G(K)H1(k)
8. Application of IDFT will give y1(n), for
n =0,1,…M-1. The starting N-1 are discarded and desired values are y1(n) for
0 ≤n ≤L-1 i.e.,
c.The samples of Z transform are taken on a more general contour that includes the unit
circle as a special case.
CZT is used in this application to sharpen the resonances by evaluating the z-transform
off the unit circle. Signal to be analyzed is a synthetic speech signal generated by exciting a
Dept., of ECE/SJBIT Page 49
Smartworld.asia 15
five-pole system with a periodic impulse train. The system was simulated to correspond to a
sampling freq. of 10 kHz. The poles are located at center freqs of 270,2290,3010,3500 & 4500
Hz with bandwidth of 30, 50, 60,87 & 140 Hz respectively.
Solution: Observe the pole-zero plots and corresponding magnitude frequency response for
different choices of |w|. The following observations are in order:
• The first two spectra correspond to spiral contours outside the unit circle with a resulting
broadening of the resonance peaks
• |w| = 1 corresponds to evaluating z-transform on the unit circle
• The last two choices correspond to spiral contours which spirals inside the unit circle and
close to the pole locations resulting in a sharpening of resonance peaks.
The cosine and sine sequences in h(n) needed for pre multiplication and post multiplication are
usually stored in a ROM. If only magnitude of DFT is desired, the post multiplications are
unnecessary,
Question 1
Solution:-
Question 2
Question 3
Solution:-
Question 4
Solution:-
Question 5
Solution:-
Question 6
Solution:-
This can be viewed as the convolution of the N-length sequence x(n) with implulse
response of a linear filter
UNIT 5
CONTENTS:-
TRANSFORMATIONS. 6 HRS
RECOMMENDED READINGS
3. DIGITAL SIGNAL PROCESSING, S. K. MITRA, TATA MC-GRAW HILL, 2ND EDITION, 2004.