Академический Документы
Профессиональный Документы
Культура Документы
Allows us to compute an approximation of the Fourier Transform on a discrete set of frequencies from a discrete set of time samples.
X( f ) =
N 1 n=0
x(t )e
k n N
j 2ft
dt
X [ k ] = x [ n] e
j 2
for k = 0, 1, , N 1
Where k are the index of the discrete frequencies and n the index of the time samples
SIEE, Slide 2
X [k] e
k =0
N 1
j 2
k n N
for n = 0, 1, , N 1
Where, again, k are the index of the discrete frequencies and n the index of the time samples.
SIEE, Slide 3
DFT Computation
N 1 n=0
We need:
SIEE, Slide 4
Cooley-Tukey algorithm:
Based on decimation, leads to a factorization of computations. Let us first look at the classical radix 2 decimation in time. This particular case of the algorithm requires the time sequence length to be a power of 2. First we split the computation between odd and even samples:
N / 2 1 n=0 x[ 2n] WNk2n + N / 2 1 n=0 x[ 2n + 1] WNk ( 2n +1)
X [k] =
SIEE, Slide 5
W = WN
2 N 2
N / 2 1 n=0
X [k] =
x [ 2n] W
+W
-k N
N / 2 1 n=0
x[ 2n + 1] W
-kn N 2
SIEE, Slide 6
WN
k+
N 2
k = WN
X [k] =
N / 2 1
and
SIEE, Slide 7
Butterfly
x(0) x(2) TFD N/2 x(N-2) x(1) x(3) TFD N/2 x(N-1) W0 W1 -
X(N-1)
SIEE, Slide 8
If N/2 is even, we can further split the computation of each DFT of size N/2 into two computations of half size DFT. When N=2r this can be done until DFT of size 2 (i.e. butterfly with two elements).
x(0) x(4) x(2) x(6) x(1) W80 W80 3rd stage 2nd stage 1st stage X(0) X(1) W80 W81 W80 W80 W80 W80 W81 W81 W82 W83 X(2) X(3) X(4) X(5) X(6) X(7)
Recursion
W80=1
SIEE, Slide 9
Number of Operations
N/2 complex (some of them are by 1). N complex +. N/2 log2(N) complex . N log2(N) complex +.
N 128 1024 4096 + 896 10240 49152 x 448 5120 24576
These counts can be compared with the ones for the DFT
SIEE, Slide 10
At each step of the algorithm, data are split between even and odd values. This results in scrambling the order.
000 001 010 011 100 101 110 111
x(0) x(4) x(2) x(6) x(1) x(5) x(3) x(7) x(0) x(2) x(4) x(6) x(1) x(3) x(5) x(7) x(0) x(1) x(2) x(3) x(4) x(5) x(6) x(7)
addres s
SIEE, Slide 11
This scrambling when we use radix 2 FFT can be obtained by the Reverse Carry Propagation (RCP) algorithm.
n 000 001 010 011 100 101 110 111 Address[x(n+1)] RCP(000+100)=100 RCP(100+100)=010 RCP(010+100)=110 RCP(110+100)=001 RCP(001+100)=101 RCP(101+100)=011 RCP(011+100)=111 Address[x(n)] 000 100 010 110 001 101 011 111
We start with address 0 then we add N/2 to obtain the next address. If there is a carry, it propagates towards the least significant bit. When the data arrive in natural order, they are scrambled in this way.
SIEE, Slide 12
Application 8 for the the TMS320C5416 DSK uses the FFT as a spectrum analyzer to display the power in an audio signal at various frequencies. Rather than using the optimized library DSPLIB for the FFT, it uses a C code version that is slower, but can be stepped through line by line using Code Composer Studio.
SIEE, Slide 13