1 / 33

Fourier transforms

Fourier transforms. http://aurora.phys.utk.edu/~forrest/papers/fourier/index.html http://www.yorvic.york.ac.uk/~cowtan/fourier/fourier.html DFTs: http://www.spd.eee.strath.ac.uk/~interact/fourier/fft.html, http://www.4p8.com/eric.brasseur/fouren.html, FFTs:

Download Presentation

Fourier transforms

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Fourier transforms http://aurora.phys.utk.edu/~forrest/papers/fourier/index.html http://www.yorvic.york.ac.uk/~cowtan/fourier/fourier.html DFTs: http://www.spd.eee.strath.ac.uk/~interact/fourier/fft.html, http://www.4p8.com/eric.brasseur/fouren.html, FFTs: http://www.dspguide.com/pdfbook.htm, Chapter 12 Wavelets: http://www.amara.com/IEEEwave/IEEEwavelet.html#contents

  2. Basic Fourier transform • Multiply function by e-2pisxand integrate • But e-2pisx is cos(2psx) - i sin(2psx) • result is to multiply function by sin or cos and integrate Signal wave Signal wave Products of sine and signal Sine waves

  3. Sample - square step signal • Note that sine wave has positive and negative values • Some components integrate to zero • Lower frequencies contribute more freq 1 2 3 4 5 Fourier component amplitudes products of sine & signal amplitude Positive part Negative part dc 2 4 frequency

  4. Sample -- time-limited sine wave • Common in holography • All signals have some time limit Signal (8 cycles of sine wave) Freq of sine wave component 1 1.05 1.1 1.15 1.2 1.25 Product waveforms signal times sine Zero integral for deviation ~ 1/#cycles

  5. Sine vs cosine • Which is better • depends on choice of origin • symmetric function -- cosine, anti-symmetric -- sine • Really want cos(2psx+ f) or sin(2psx+ f) • f contains origin info • Can be built up from sin and cos • A sin(2psx) + B cos(2psx) = (A2+B2)cos(2psx+tan-1(B/A)) Phase shift of sine component 0 0.2p 0.4p 0.5p = cosine 0.6p 0.8p p Signal (8 cycles of sine wave) Product waveforms -- signal times sine

  6. Most important property of Fourier transforms • Fourier transform of product of 2 functions • convolution of Fourier transforms • F.T. of convolution is product (and converse) • great simplification -- critical for many applications Product Convolution Signal 1 Transform 1 Signal 2 Transform 2

  7. Discrete Fourier transform • Fixed time sampling intervals • not continuous • Sampling interval must be fine enough • aliasing • Nyquist limit t = 1/(2f), where f is maximum Fourier frequency in signal Fine sampling Coarse sampling

  8. Aliasing • Time sampling too far apart • Looks like sine wave of different freq Over-sampled -- faithful representation Under-sampled (solid lines)

  9. More examples of aliasing • Theory developed for sound reproduction • digital music CDs

  10. Fast Fourier Transform (FFT) • Normal DFT takes N2 operations • FFT takes NlogN operations • very important as N grows larger • many key DFT applications would not be practical without it

  11. Form of FFT • Use complex representation • reduces second order diff eqns to first order eqns • Lowest freq component W = e2p i/N = cos(2p /N) + i sin(2p /N) • exactly one cycle over full waveform • Use powers of lowest freq • As in DFT, integral replaced by sum • Length of time step omitted • usually constant time frequency

  12. Real DFT vs complex DFT cosine sine

  13. Decomposition step • Decimation • Each step reduces size of problem by 2 • creates twice as many problems • each problem simpler • original problem N2 computation steps • reduced problem N single computation steps • log2N steps to reduce • result Nlog2N vs N2 even odd ee eo oe oo

  14. even odd ee eo oe oo Decomposition step example • Each step reduces waveform complexity • Final result is single sample point • Fourier transform of single value = the value 0 15

  15. 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 0000 0010 0100 0110 1000 1010 1100 1110 0001 0011 0101 0111 1001 1011 1101 1111 0000 0100 1000 1100 0010 0110 1010 1110 0110 0000 1000 0100 1100 0010 1010 0110 1110 0001 1001 0101 1101 0011 1011 0111 1111 0000 1000 0100 1100 Decomposition is simple swap • Look at binary representations of sample indices • Each step sorts by least significant bit • like perfect un-shuffle operation

  16. Fourier transform step • FT of single-valued function is itself • Do nothing N = 1 time frequency W = e2p i/N

  17. Recombination step • Reconstruct original function by reversing decomposition steps • Must work in Fourier domain Expand by padding with zeros Time shift odd part Sum

  18. Summing step in recombination • FT of sum = sum of FTs time frequency W = e2p i/N Sum

  19. Time-shift step in recombination • Multiply transform by “sine wave” -- • Product of FT and sine = convolution of function with time-shifted delta function Time shifter time frequency 2t’ = t Time shift odd part

  20. Freq. from 0 to N expand frequency time Expand by padding with zeros • Non-intuitive • Expand by dividing frequency by 2 • does not change number of points • To add points need to add FT freq. Components (Nyquist f=1/2N) • What to add? • Frequencies from N to 2N-1 Add frequencies Expand by padding with zeros Choose so that f odd = 0

  21. Example - expand and pad with zeros • Divide frequency by 2 • Add high frequency Fourier component • Same amplitude cos(2px/4) cos(2px/8) + cos(2px7/8) Pad with zeros

  22. Example - expand, pad, time-shift • Correct result cos(2px/4) cos(2px/8) + cos(2px7/8) Pad with zeros Time shift sin(2px/8) [cos(2px/8) + cos(2px7/8)]

  23. Operations needed - pad with zeros and time-shift • Duplicate low freq FT amplitudes in high freq components

  24. Implementation of recombination • Use butterfly network • Multiply (time-shift), pad with zeros (duplicate), and sum Basic 2x2 is repeated to get NxN inter-connections

  25. Quadratic speedup • FFT has N log2 N operations vs. N2 • quadratic for large N

  26. 2-D Fourier transforms FT of fuzzy dot • Magnitude and phase • both are important input FT • Graphical representation • phases color coded • white = 0 amplitude FT of array of fuzzy dots input FT

  27. More 2-D FTs Inputs FTs • Convolution in 2-D • molecular crystal • FT of convolution = product of FTs “molecule” Array of molecules

  28. Filtered FTs Recovered images Low pass filter Input 2D-FT High pass filter 2D FTs and filtering • Spatial filters • Take FT • Remove part of FT • Reconstruct input

  29. Magnitude vs. phase • FT has real and imag parts • Convert to magnitude and phase • A sin(2psx) + B cos(2psx) = (A2+B2)cos(2psx+tan-1(B/A)) Inputs FTs Mixed FTs Output images duck Magnitude of duck phase of cat cat Magnitude of cat phase of duck

  30. Lenses and FTs • Refraction -- Snell’s law • Lens is position-dependent wedge or prism • larger refraction angles away from center • Angle at lens becomes point at focal plane • delta function in angle (k-vector) becomes delta function in position x • like FT • what applies to delta functions also applies to complicated functions Ray tracings for lens

  31. Wavelets • Input functions with discontinuities • large number of Fourier frequencies needed for edge • unnecessary computational overhead for rest of signal • Segment input -- use bandwidth limited sine waves • 1D analogy -- musical notes vs FT of entire symphony • can also generalize to more complex basis functions • Wavelets • variable grid • Truncated sine waves • fixed grid

  32. Sample wavelets • Popular wavelets -- 4 main families • Daubechies has fractal character Top 4 wavelets Wavelet with fractal character

  33. Wavelet applications • Fingerprint ID -- less storage than FT • 0.6 MB each, raw data -- FBI files 200 TB • Data smoothing • do wavelet transform • threshold and reconstruct • Speech synthesis • choose basis functions to minimize storage/computations Data smoothing Fingerprint storage/recognition Speech synthesis

More Related