Decimation in time and frequency
-
Upload
saritha-reddy -
Category
Documents
-
view
18.543 -
download
85
description
Transcript of Decimation in time and frequency
DECIMATION IN DECIMATION IN TIME AND FREQUENCYTIME AND FREQUENCY
Dr. C. SarithaDr. C. Saritha
Lecturer in ElectronicsLecturer in Electronics
SSBN Degree & PG CollegeSSBN Degree & PG College
ANANTAPUR ANANTAPUR
INDEX
INTRODUCTION TO FFTINTRODUCTION TO FFT DECIMATION IN TIME(DIT)DECIMATION IN TIME(DIT) DECIMATION IN FREQUENCY(DIF)DECIMATION IN FREQUENCY(DIF) DIFFERENCES AND SIMILARITIESDIFFERENCES AND SIMILARITIES
Fourier TransformFourier Transform A fourier transform is an useful A fourier transform is an useful
analytical tool that is important for many analytical tool that is important for many fields of application in the digital signal fields of application in the digital signal processing.processing.
In describing the properties of the In describing the properties of the fourier transform and inverse fourier fourier transform and inverse fourier transform, it is quite convenient to use transform, it is quite convenient to use the concept of time and frequency.the concept of time and frequency.
In image processing applications it plays In image processing applications it plays aa
critical role. critical role.
Fast fourier transformFast fourier transform
Fast fourier transform proposed by Fast fourier transform proposed by Cooley and Tukey in 1965.Cooley and Tukey in 1965.
The fast fourier transform is a highly The fast fourier transform is a highly efficient procedure for computing the efficient procedure for computing the DFT of a finite series and requires DFT of a finite series and requires less number of computations than less number of computations than that of direct evaluation of DFT.that of direct evaluation of DFT.
The FFT is based on decomposition The FFT is based on decomposition and breaking the transform into and breaking the transform into smaller transforms and combining smaller transforms and combining them to get the total transform.them to get the total transform.
DiscrDiscrete Fourier Transformete Fourier Transform The DFT pair was given asThe DFT pair was given as
Baseline for computational complexity: Baseline for computational complexity:
Each DFT coefficient requiresEach DFT coefficient requiresN complex multiplicationsN complex multiplicationsN-1 complex additionsN-1 complex additions
All N DFT coefficients requireAll N DFT coefficients requireNN22 complex multiplications complex multiplicationsN(N-1) complex additionsN(N-1) complex additions
1N
0k
knN/2jekXN1
]n[x
1
0
/2][N
n
knNjenxkX
What is FFT?What is FFT? The fast fourier is an algorithm used The fast fourier is an algorithm used
to compute the DFT. It makes use of to compute the DFT. It makes use of the symmetry and periodicity the symmetry and periodicity properties of twiddle factor wproperties of twiddle factor wN N to to effectively reduce the DFT effectively reduce the DFT computation time.computation time.
It is based on the fundamental It is based on the fundamental principle of decomposing the principle of decomposing the computation of DFT of a sequence of computation of DFT of a sequence of length N into successively smaller length N into successively smaller DFT.DFT.
Symmetry and periodicitySymmetry and periodicity
Symmetry
Periodicity
)()(
)()(
)(
kNnN
nNkN
knN
nNkN
NnkN
knN
knN
knN
WWW
WWW
WW
kN
N/kN
N/N
mnkmN
nkN
mnkmN
nkN
WWW
WWWW
)2(2
//
,1
,
FFT algorithm provides speed FFT algorithm provides speed increase factors, when compared increase factors, when compared with direct computation of the DFT, with direct computation of the DFT, of approximately 64 and 205 for 256 of approximately 64 and 205 for 256 point and 1024 point transforms point and 1024 point transforms respectively.respectively.
The number of multiplications and The number of multiplications and additions required to compute N-additions required to compute N-point DFT using radix-2 FFT are point DFT using radix-2 FFT are NlogNlog22N and N/2 logN and N/2 log22N respectively.N respectively.
Example:Example:
The number of complex multiplications The number of complex multiplications required using direct computation isrequired using direct computation is
NN22=64=6422 =4096 =4096
The number of complex multiplications The number of complex multiplications required using FFT is required using FFT is
N/2logN/2log2 2 N=64/2logN=64/2log2 2
64=19264=192
Speed improvement factor Speed improvement factor =4096/192= 21.33.=4096/192= 21.33.
FFT AlgorithmsFFT Algorithms
There are basically two types of FFT There are basically two types of FFT algorithms. algorithms.
They are:They are:
1.1. Decimation in Time Decimation in Time
2.2. Decimation in frequency Decimation in frequency
Decimation in timeDecimation in time DIT algorithm is used to calculate the DIT algorithm is used to calculate the
DFT of a N-point sequence.DFT of a N-point sequence. The idea is to break the N-point The idea is to break the N-point
sequence into two sequences, the DFTs sequence into two sequences, the DFTs of which can be obtained to give the of which can be obtained to give the DFT of the original N-point sequence.DFT of the original N-point sequence.
Initially the N-point sequence is divided Initially the N-point sequence is divided into N/2-point sequences xinto N/2-point sequences xee(n) and (n) and xx00(n) ,(n) ,
which have even and odd numbers of which have even and odd numbers of x(n) respectively.x(n) respectively.
The N/2-point DFTs of these two The N/2-point DFTs of these two sequences are evaluated and sequences are evaluated and combined to give the N-point DFT.combined to give the N-point DFT.
Similarly the N/2-point DFTs can be Similarly the N/2-point DFTs can be expressed as a combination of N/4-expressed as a combination of N/4-point DFTs.point DFTs.
This process is continued until we are This process is continued until we are left with two point DFT.left with two point DFT.
This algorithm is called decimation-This algorithm is called decimation-in-time because the sequence x(n) is in-time because the sequence x(n) is often split into smaller sequences.often split into smaller sequences.
Radix-2 DIT- FFT AlgorithmRadix-2 DIT- FFT Algorithm
Radix-2: the sequence length N satisfied:L is an integer
LN 2
To decompose an N point time domain signal into N signals each containing a single point. Each decomposing stage uses an interlace decomposition, separating the even- and odd-indexed samples;
To calculate the N frequency spectra corresponding to these N time domain signals.
Radix-2 DIT- FFT AlgorithmRadix-2 DIT- FFT Algorithm
0 4 8 12 2 6 10 14 1 5 9 13 3 7 11 15
0 8 4 12 2 10 6 14 1 9 5 13 3 11 7 15
0 8 4 12 2 10 6 14 1 9 5 13 3 11 7 15
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 151 signal of 16 points
0 2 4 6 8 10 12 14 1 3 5 7 9 11 13 152 signals of 8 points
4 signals of 4 points
8 signals of 2 points
16 signals of 1 point
Radix-2 DIT- FFT AlgorithmRadix-2 DIT- FFT Algorithm
Algorithm principle
To divide N-point sequence x(n) into two N/2-point sequence x1(r) and x2(r)
12
,2,1,0 , )12()( );2()( 21 N
rrxrxrxrx To compute the DFT of x1(r) and x2(r)
)12
~0( )12()()(
)12
~0( )2()()(
12
0 2
12
0 2
22
12
0 2
12
0 2
11
NkWrxWrxkX
NkWrxWrxkX
N
r
rkN
N
r
rkN
N
r
rkN
N
r
rkN
To compute the DFT of N-point sequence x(n)
)1,2,1,0( )()(
)()(
)12()2(
)()()()(
21
12
0 2
2
12
0 2
1
12
0
)12(
12
0
2
1
)(0
1
)(0
1
0
NkkXWkX
WrxWWrx
WrxWrx
WnxWnxWnxkX
kN
N
r
rkN
kN
N
r
rkN
N
r
krN
N
r
rkN
N
oddn
nkN
N
evenn
nkN
N
n
nkN
)12
,1,0( )()(
)2
()2
()2
(
)12
,1,0( )()()(
21
2
)2
(
1
21
NkkXWkX
NkXW
NkX
NkX
NkkXWkXkX
kN
Nk
N
kN
)(nx
)(1 rx
)(2 rx
)(1 kX
)(2 kX
)(kX
Butterfly computation flow graph
)12
,1,0( )()()2
(
)12
,1,0( )()()(
21
21
NkkXWkX
NkX
NkkXWkXkX
kN
kN
)(1 kX
)(2 kXk
NW
)()( 21 kXWkX kN
)()( 21 kXWkX kN
1
There are 1 complex multiplication and 2 complex additions
N/2-point
DFT
N/2-point
DFT
)0(1X
)1(1X
)2(1X
)3(1X
)0(2X
)1(2X
)2(2X
)3(2X
0NW
1NW
2NW
3NW
)0()0(1 xx
)2()1(1 xx
)4()2(1 xx
)6()3(1 xx
)1()0(2 xx
)3()1(2 xx
)5()2(2 xx
)7()3(2 xx
)(1 rx
)(2 rx
)4(X1
)5(X1
)6(X1
)7(X1
)0(X
)1(X
)2(X
)3(X
N-point DFT
Radix-2 DIT- FFT AlgorithmRadix-2 DIT- FFT Algorithm
for 32N
)(nx2-point
DFT
2-pointDFT
2-pointDFT
2-pointDFT
Synthesize the 2-point DFTs into a 4-point DFT
Synthesize the 2-point DFTs into a 4-point DFT
Synthesize the 4-point DFTs into a 8-point DFT
)(kX
3-stage synthesize, each has N/2 butterfly computation
The computation complexity
Radix-2 DIT- FFT AlgorithmRadix-2 DIT- FFT Algorithm
•At the end of computation flow graph at any stage, output variables can be stored in the same registers previously occupied by the corresponding input variables.
•This type of memory location sharing is called in-place computation which results in significant saving in overall memory requirements.
The distance between two nodes in a butterfly
For there are L stagesLN 2
Stage Stage DistanceDistance
stage 1stage 1 11
stage 2stage 2 22
stage 3stage 3 44
stage stage LL
12 L
Radix-2 DIT- FFT AlgorithmRadix-2 DIT- FFT Algorithm
Bit-reversed order
In the DFT computation scheme, the DFT samples X(k) appear at the output in a sequential order while the input samples x(n) appear in a different order: a bit-reversed order.
Thus, a sequentially ordered input x(n) must be reordered appropriately before the fast algorithm can be implemented.
Let m, n represent the sequential and bit-reversed order in binary forms respectively, then:m: 000 001 010 011 100 101 110 111
n: 000 100 010 110 001 101 011 111
Why is the input bit-reversed order
1n 2n
)( 012 nnnx
0n
0
1
0
1
0
10
1
0
1
0
10
1
)000(x
)100(x
)010(x
)110(x
)001(x
)101(x
)011(x
)111(x
)(0x
)(4x
)(2x
)(6x
)(1x
)(5x
)(3x
)(7x
How to get the bit-reversed order
Let represent the natural order, the represent the bit-reversed order, then:
n n̂
)ˆ()(ˆ nxnxnn , if
)0(A )1(A )2(A )3(A )4(A )5(A )6(A )7(A
)0(x )1(x )2(x )3(x )4(x )5(x )6(x )7(xn
n̂ )0(x )7(x)1(x)4(x )6(x)2(x )3(x)5(x
Decimation-In-FrequencyDecimation-In-Frequency
It is a popular form of FFT algorithm.It is a popular form of FFT algorithm. In this the output sequence x(k) is In this the output sequence x(k) is
divided into smaller and smaller divided into smaller and smaller subsequences, that is why the name subsequences, that is why the name decimation in frequency,decimation in frequency,
Initially the input sequence x(n) is Initially the input sequence x(n) is divided into two sequences x1(n) and divided into two sequences x1(n) and x2(n) consisting of the first n/2 x2(n) consisting of the first n/2 samples of x(n) and the last n/2 samples of x(n) and the last n/2 samples of x(n) respectivelysamples of x(n) respectively
Radix-2 DIF- FFT AlgorithmRadix-2 DIF- FFT Algorithm
Algorithm principle
To divide N-point sequence x(n) into two N/2-point sequence
12
0 ),2
(
12
0 ),(
Nn
Nnx
NnnxThe former N/2-point
The latter N/2-point
0 1 2 3 4 5 6 7
0 1 2 3 4 5 6 7
0 1 2 3 0 1 2 3
butterfly computation
0 1 2 3 0 1 2 3
butterfly computation butterfly computation
0 1 0 1 0 1 0 1
butterfly butterfly butterfly butterfly
0 4 2 6 1 5 3 7
0 1 0 1 0 10 1
)(nx
)(kX
To compute the DFT of N-point sequence x(n)
)1,1,0( )2
()1()(
)2
()(
)2
()(
)()()()(
12
0
12
0
2
12
0
)2
(1
2
0
1
2
12
0
1
0
NkWNnxnx
WNnxWnx
WNnxWnx
WnxWnxWnxkX
N
n
nkN
k
N
n
nkN
kN
N
N
n
kNn
N
N
n
nkN
N
Nn
nkN
N
n
nkN
N
n
nkN
Radix-2 DIF- FFT AlgorithmRadix-2 DIF- FFT Algorithm
To separate the even and odd numbered samples of X(k)
)12
,,1,0 ( ,12 ,2let Nrrkrk
)12
,1,0( )2
()( )2(1
2
0 2
NrWNnxnxrX
N
n
nrN
)12
,1,0( )2
()( )12(1
2
0 2
NrWWNnxnxrX
N
n
nrN
nN
Radix-2 DIF- FFT AlgorithmRadix-2 DIF- FFT Algorithm
)12
,1,0( )( )12(
)12
,1,0( )( )2(
12
0 22
12
0 21
NrWnxrX
NrWnxrX
N
n
nrN
N
n
nrN
12
,1,0 )
2()()(
)2
()()(let
2
1
N
nW
Nnxnxnx
Nnxnxnx
nN
Radix-2 DIF- FFT AlgorithmRadix-2 DIF- FFT Algorithm
)(nx
)2
( Nnx n
NW
1
)2
()()(1Nnxnxnx
nNW
Nnxnxnx )
2()()(2
Butterfly computation flow graph
There are 1 complex multiplication and 2 complex additions
for 32N
N/2-point
DFT
N/2-point
DFT
)0(X
)2(X
)4(X
)6(X
)1(X
)3(X
)5(X
)7(X
)0(1x
)1(1x
)2(1x
)3(1x
)0(x
)1(x
)2(x
)3(x
)4(x
)5(x
)6(x
)7(x)3(2x3
NW1
)2(2x2NW
1
)1(2x1NW
1
)0(2x0NW
1
for 32N
)0(x
)2(x
)1(x
)3(x
)4(x
)6(x
)5(x
)7(x
)0(X
)4(X
)2(X
)6(X
)1(X
)5(X
)3(X
)7(X
1
1
1
1
0NW
1NW
2NW
3NW
1
1
1
1
1
0NW
1
0NW
0NW
2NW
1
0NW
1
0NW
0NW
2NW
Radix-2 DIF- FFT AlgorithmRadix-2 DIF- FFT Algorithm
The comparison of DIT and DIF
The order of samplesDIT-FFT: the input is bit- reversed order and the output is natural orderDIF-FFT: the input is natural order and the output is bit- reversed order
The butterfly computationDIT-FFT: multiplication is done before additionsDIF-FFT: multiplication is done after additions
Radix-2 DIF- FFT AlgorithmRadix-2 DIF- FFT Algorithm
Both DIT-FFT and DIF-FFT have the identical computation complexity. i.e. for , there are total L stages and each has N/2 butterfly computation. Each butterfly computation has 1 multiplication and 2 additions.
LN 2
Both DIT-FFT and DIF-FFT have the characteristic of in-place computation.
A DIT-FFT flow graph can be transposed to a DIF-FFT flow graph and vice versa.