|
|
(One intermediate revision by one other user not shown) |
Line 1: |
Line 1: |
| :''This article is about butterfly diagrams in FFT algorithms; for the sunspot diagrams of the same name, see [[Solar cycle]].''
| | Hello. Let me introduce the author. Her name is Refugia Shryock. His spouse doesn't like it the way he does but what he truly likes doing is to do aerobics and he's been doing it for quite a while. Hiring is my profession. Years in the past we moved to North Dakota and I adore each working day living here.<br><br>Here is my homepage: [http://Support.Kaponline.com/entries/46228144-Endocrine-Illnesses-Canines-Part-1 Support.Kaponline.com] |
| | |
| [[Image:Butterfly-FFT.png|thumb|200px|right|[[Data flow diagram]] connecting the inputs ''x'' (left) to the outputs ''y'' that depend on them (right) for a "butterfly" step of a radix-2 Cooley–Tukey FFT. This diagram resembles a [[butterfly]] (as in the [[Morpho (butterfly)|Morpho butterfly]] shown for comparison), hence the name.]] In the context of [[fast Fourier transform]] algorithms, a '''butterfly''' is a portion of the computation that combines the results of smaller [[discrete Fourier transform]]s (DFTs) into a larger DFT, or vice versa (breaking a larger DFT up into subtransforms). The name "butterfly" comes from the shape of the data-flow diagram in the radix-2 case, as described below.<ref name=Oppenheim89>Alan V. Oppenheim, Ronald W. Schafer, and John R. Buck, ''Discrete-Time Signal Processing'', 2nd edition (Upper Saddle River, NJ: Prentice Hall, 1989)</ref> The same structure can also be found in the [[Viterbi algorithm]], used for finding the most likely sequence of hidden states.
| |
| | |
| Most commonly, the term "butterfly" appears in the context of the [[Cooley–Tukey FFT algorithm]], which [[recursion|recursively]] breaks down a DFT of [[composite number|composite]] size ''n'' = ''rm'' into ''r'' smaller transforms of size ''m'' where ''r'' is the "radix" of the transform. These smaller DFTs are then combined via size-''r'' butterflies, which themselves are DFTs of size ''r'' (performed ''m'' times on corresponding outputs of the sub-transforms) pre-multiplied by [[root of unity|roots of unity]] (known as [[twiddle factor]]s). (This is the "decimation in time" case; one can also perform the steps in reverse, known as "decimation in frequency", where the butterflies come first and are post-multiplied by twiddle factors. See also the [[Cooley–Tukey FFT]] article.)
| |
| | |
| ==Radix-2 butterfly diagram==
| |
| In the case of the radix-2 Cooley–Tukey algorithm, the butterfly is simply a DFT of size-2 that takes two inputs (''x''<sub>0</sub>, ''x''<sub>1</sub>) (corresponding outputs of the two sub-transforms) and gives two outputs (''y''<sub>0</sub>, ''y''<sub>1</sub>) by the formula (not including [[twiddle factor]]s):
| |
| | |
| :<math>y_0 = x_0 + x_1 \, </math>
| |
| :<math>y_1 = x_0 - x_1. \, </math>
| |
| | |
| If one draws the data-flow diagram for this pair of operations, the (''x''<sub>0</sub>, ''x''<sub>1</sub>) to (''y''<sub>0</sub>, ''y''<sub>1</sub>) lines cross and resemble the wings of a [[butterfly]], hence the name (see also the illustration at right).
| |
| | |
| [[Image:DIT-FFT-butterfly.png|thumb|300px|right|A decimation-in-time radix-2 FFT breaks a length-''N'' DFT into two length-''N''/2 DFTs followed by a combining stage consisting of many butterfly operations.]]
| |
| More specifically, a decimation-in-time FFT algorithm on ''n'' = 2<sup> ''p''</sup> inputs with respect to a primitive ''n''-th root of unity ''ω'' = exp(2''πi'' / ''n'') relies on O(''n'' log ''n'') butterflies of the form:
| |
| | |
| :<math>y_0 = x_0 + x_1 \omega^k \, </math>
| |
| :<math>y_1 = x_0 - x_1 \omega^k, \, </math>
| |
| | |
| where ''k'' is an integer depending on the part of the transform being computed. Whereas the corresponding inverse transform can mathematically be performed by replacing ''ω'' with ''ω''<sup>−1</sup> (and possibly multiplying by an overall scale factor, depending on the normalization convention), one may also directly invert the butterflies:
| |
| | |
| :<math>x_0 = \frac{1}{2} (y_0 + y_1) \, </math> | |
| :<math>x_1 = \frac{\omega^{-k}}{2} (y_0 - y_1), \, </math>
| |
| | |
| corresponding to a decimation-in-frequency FFT algorithm.
| |
| | |
| ==Other uses==
| |
| The butterfly can also be used to improve the randomness of large arrays of partially random numbers, by bringing every 32 or 64 bit word into causal contact with every other word through a desired hashing algorithm, so that a change in any one bit has the possibility of changing all the bits in the large array.<ref>*{{Citation | last1=Press | first1=WH | last2=Teukolsky | first2=SA | last3=Vetterling | first3=WT | last4=Flannery | first4=BP | year=2007 | title=Numerical Recipes: The Art of Scientific Computing | edition=3rd | publisher=Cambridge University Press | publication-place=New York | isbn=978-0-521-88068-8 | chapter=Section 7.2 Completely Hashing a Large Array | chapter-url=http://apps.nrbook.com/empanel/index.html#pg=358}}</ref>
| |
| | |
| == See also ==
| |
| * [[Mathematical diagram]]
| |
| * [[Zassenhaus lemma]]
| |
| | |
| == References ==
| |
| <references/>
| |
| | |
| ==External links==
| |
| * [http://www.relisoft.com/Science/Physics/fft.html explanation of the FFT and butterfly diagrams].
| |
| * [http://www.cmlab.csie.ntu.edu.tw/cml/dsp/training/coding/transform/fft.html butterfly diagrams of various FFT implementations (Radix-2, Radix-4, Split-Radix)].
| |
| <!-- dead link * [http://astron.berkeley.edu/~jrg/ngst/fft/fftbutfy.html explanation of butterfly diagrams specifically].-->
| |
| | |
| [[Category:FFT algorithms]]
| |
| [[Category:Diagrams]]
| |
Hello. Let me introduce the author. Her name is Refugia Shryock. His spouse doesn't like it the way he does but what he truly likes doing is to do aerobics and he's been doing it for quite a while. Hiring is my profession. Years in the past we moved to North Dakota and I adore each working day living here.
Here is my homepage: Support.Kaponline.com