Sie sind auf Seite 1von 9

Humbly Offered At AMMA’s Lotus Feet

Efficient DFT calculation: FFT


F T
D 1 N−1 −j
2π k n
1 N−1 WNn,k = twiddle factors
~
ck = ∑ s[n] ⋅ e
N n =0
N = ∑
N n =0
s[n] ⋅ WNkn
k = 0,1 .. N-1
W86,k
W85,k W87,k
Direct DFT calculation redundancy
WNkn periodic function calculated many times. W80,k
W84,k

Direct DFT calculation requires


~N2 complex multiplications. ! W83,k W81,k
AD
complexity O(N2) B W82,k
RY
V E
Algorithms (= Fast Fourier Transform) developed to compute N-points DFT with
~ Nlog2N multiplications (complexity O(Nlog2N) ).
FFT advantages
2000
N DFT Radix-2
Number of Operations

1500
DFT ∝ N2 4 16 4
1000 32 1024 80
FFT ∝ N log2N
500
128 16384 448
1024 1048576 5120
0

0 10 20 30 40
Number of samples, N

DSPs & PLDs influenced algorithms design. ‘60s & ‘70s: multiplication
counts was “quality factor”. Now: number of additions & memory access
(s/w) and communication costs (h/w) also important.

NB: Usually you don’t want to write an FFT algorithm, just to “borrow” it !!!
Go “shopping” onto the web!
FFT philosophy
General philosophy (to be applied recursively): divide & conquer.

sub-problems + cost(mapping)
Σcost(sub-problems) mapping < cost(original problem)
problem

Different algorithms balance costs differently.

Example: Decimation-in-time
time frequency
algorithm
Step 1: Time-domain decomposition. N-points
signal → N, 1-point signals (interlace
(*) decomposition). Shuffled input data (bit-
reversal). log2N stages.

(*): only first decomposition shown.


Step 2: 1-point input spectra calculation.
(Nothing to do!)

Step 3: Frequency-domain synthesis.


N spectra synthesised into one.
FFT family tree
Divide & conquer

N : GCD(*)(N1,N2) = 1
N : GCD(N1,N2) <> 1
N1, N2 co-prime. Ex: 240 = 16·3·5
Ex: N = 2n
Cost: SUB-PROBLEMS.
SUB-PROBLEMS Cost: MAPPING.
MAPPING

• No twiddle-factors calculations. • Twiddle-factors calculations.


• Easier mapping (permutations). • Easier sub-problems.
• Some algorithms: • Some algorithms:
Good-Thomas, Kolba, Cooley-Tukey,

Parks, Winograd. Decimation-in-time / in-frequency


Radix-2, Radix-4,

* GCD= Greatest Common Divisor


( )
Split radix.
(Some) FFT concepts & notes
s[k]
WN0
Butterfly: basic FFT calculation element.

s[k+N/2] WNN/2
Dual approach: data to be reordered
• Decimation-in-time ⇒ time data shuffling. in time or in frequency!

• Decimation-in-frequency ⇒ frequency data shuffling.

• In-place computation: no auxiliary storage needed, allowed by most algorithms.

• DFT pruning: only few bins needed or different from zero ⇒ only they get
calculated (ex: Goertzel algorithm).

• Real-data case: Mirroring effect in DFT coeffs. ⇒ only half of them calculated.

• N power-of-two: Many common FFT algorithms work with power-of-two number


of inputs. When they are not ⇒ pad inputs with zeroes.
Systems spectral analysis (hints)
System analysis: measure input-output relationship.

Linear Time Invariant


δ[n] h[n]
x[n] DIGITAL LTI y[n] 1 DIGITAL
SYSTEM LTI
SYSTEM
h[n] 0 n 0 n
h[t] = impulse response


x[n] h[n] y[n] = x[n] ∗ h[n] = ∑ x[n − m] ⋅ h[m] y[n] predicted from { x[n], h[t] }
m=0

X(f) H(f) Y(f) = X(f) · H(f) H(f) : LTI transfer function

Transfer function can be estimated by Y(f) / X(f)


Estimating H(f) (hints)

G xx (f) = X(f) ⋅ X * (f) Power Spectral Density of x[t]


(FT of autocorrelation).

G yx (f) = Y(f) ⋅ X* (f) Cross Power Spectrum of x[t] & y[t]


(FT of cross-correlation).

Y(f) Y(f) ⋅ X * (f) G yx Transfer Function


H(f) = = =
*
X(f) X(f) ⋅ X (f) G xx (ex: beam !)

2 Coherence function
G yx (f)
C xy (f) = - values in [0,1]
G xx (f) ⋅ G yy (f) - assess degree of linear relationship
between x[t] & y[t].
It is a check on
H(f) validity!
Aum Namah Sivaya

Das könnte Ihnen auch gefallen