Вы находитесь на странице: 1из 23

# FFT

A B

X = A + BW Y = A BW

B.Baas, 2012,EEC281

14

## FFT Dataflow Diagram

Dataflowdiagram
0 4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 63

Memory Locations

Input
B.Baas, 2012,EEC281

Output
15

B.Baas, 2012,EEC281

16

B.Baas, 2012,EEC281

17

B.Baas, 2012,EEC281

18

B.Baas, 2012,EEC281

19

B.Baas, 2012,EEC281

20

B.Baas, 2012,EEC281

21

B.Baas, 2012,EEC281

22

B.Baas, 2012,EEC281

23

Inputorderdecimatedneedsbitreversal Outputinorder Criticalpath: Butterfly:
B A B X = A + BW x Y = A BW A car-sav add +
B.Baas, 2012,EEC281
24

## Radix 2, Decimation In Frequency (DIF)

Inputinorder Outputdecimatedneeds bitreversal Butterfly:
TwoCPAs Widermultiplier A B X=A+B Y = (A B) W Criticalpath: A B

+ ()
W

x +
25

B.Baas, 2012,EEC281

DecimationinTime(DIT)orDecimationin Frequency(DIF)

A B C D

V W X Y

B.Baas, 2012,EEC281

26

Normally:
DIT:bitreverseinputsbeforeprocessing
BIT REVERSAL

DIF:bitreverseoutputsafterprocessing

000(0) 001(1) 010(2) 011(3) 100(4) 101(5) 110(6) 111(7) 000(0)#Word0doesnotmovelocation 100(4)#Originalword1goestolocation4 010(2)#Word2doesnotmovelocation 110(6)#Originalword3goestolocation6 001(1) #Originalword4goestolocation1 101(5) #Word5doesnotmovelocation 011(3) #Originalword6goestolocation3 111(7) #Word7doesnotmovelocation

BIT REVERSAL

Matlab
Matlabcannotindexarrayswithindexzero!

thenusepointerswithanoffsetofonewhenever indexingarrays
B.Baas, 2012,EEC281
28

B.Baas, 2012,EEC281

29

I. Common-Factor FFTs
Keycharacteristics
MostcommonclassofFFTs AlsocalledCooleyTukey FFTs FactorsofN usedindecompositionhavecommonfactor(s)

N =rk, wherek isapositiveinteger Butterfliesusedineachstagearethesame Radixr butterfliesareused N/r butterfliesperstage k =logr N stages

B.Baas, 2012,EEC281

30

I. Common-Factor FFTs

B.Baas, 2012,EEC281

31

## II. Prime-Factor FFTs

B.Baas, 2012,EEC281

32

## III. Other FFTs

When N =pk,wherep isasmallprimenumberandk isa positiveinteger,thismethodcanbemoreefficientthan standardradixp FFTs SplitradixAlgorithmsforLengthpm DFTs, Vetterli and Duhamel,Trans.onAcoustics,Speech,andSignalProcessing, Jan.1989 A B C D
B.Baas, 2012,EEC281

V W Wa X Y
33

Wb

## III. Other FFTs

FFTW(www.fftw.org)
Csubroutinelibrarieshighlytunedforspecificarchitectures

Goertzel DFT
Notanormal FFTinthatitscomputationalcomplexityis stillorderN2 ItallowsasubsetoftheDFTs N outputtermstobe efficientlycalculated

B.Baas, 2012,EEC281

34

Signal Growth
NoteinDFTequationsignalcangrowbyN times ThisisalsoseenintheFFTinitsgrowthbyr timesin aradixr butterfly,andlogrN stagesintheentire transform:r ^(logrN) =N Thus,theFFTprocessorrequirescarefulscaling
Floatingpointnumberrepresentation
Easiestconceptually,butexpensivehardware.Typicallynot usedinefficientDSPsystems.

Fixedpointwithscalingby1/r everystage
Firststageisaspecialcase.Scalingmustbedoneontheinputs beforeprocessingtoavoidoverflowwithlargemagnitude complexinputswithcertainphases.

Blockfloatingpoint
B.Baas, 2012,EEC281
35

## Efficient Computation of the IFFT

DesignaseparateprocessorforIFFTs ReuseaforwardFFTengineifavailabletocalculate
out = IFFT(in)

Swappingrealandimaginaryparts:
a = fft(imag(in) + i*real(in)); out = (imag(a) + i*real(a));

Usingconjugates:
a = fft(conj(in)); out = conj(a);

Asimpleindexingchange:
a = fft(in); out = [a(0) a(N-1:-1:1)]; out = [a(1) a(N :-1:2)]; % with normal indices % with weird matlab indices

B.Baas, 2012,EEC281

36