Content deleted Content added
No edit summary |
→References: | Altered template type. Add: isbn, chapter, title. | Use this tool. Report bugs. | #UCB_Gadget |
||
(46 intermediate revisions by 30 users not shown) | |||
Line 1:
{{Short description|Fast Fourier transform algorithm}}
'''Bruun's algorithm''' is a [[fast Fourier transform]] (FFT) algorithm based on an unusual recursive [[polynomial]]-factorization approach, proposed for powers of two by G. Bruun in 1978 and generalized to arbitrary even composite sizes by H. Murakami in 1996. Because its operations involve only real coefficients until the last computation stage, it was initially proposed as a way to efficiently compute the [[discrete Fourier transform]] (DFT) of real data. Bruun's algorithm has not seen widespread use, however, as approaches based on the ordinary [[
Nevertheless, Bruun's algorithm illustrates an alternative algorithmic framework that can express both itself and the
== A polynomial approach to the DFT ==
Recall that the DFT is defined by the formula:
▲:<math>f_j = \sum_{k=0}^{n-1} x_k e^{-\frac{2\pi i}{n} jk }
\qquad
For convenience, let us denote the ''
The DFT can then be understood as a ''reduction'' of this polynomial; that is, ''
▲:<math>\omega_n^k = e^{-\frac{2\pi i}{n} k }</math>
where '''mod'''
== Recursive factorizations and FFTs ==▼
▲and define the polynomial ''X''(''z'') whose coefficients are ''x''<sub>''k''</sub>:
In order to compute the DFT, we need to evaluate the remainder of
▲:<math>X(z) = \sum_{k=0}^{n-1} x_k z^k</math>
The product of all of the monomials <math>(
▲The DFT can then be understood as a ''reduction'' of this polynomial; that is, ''f''<sub>''j''</sub> is given by:
More explicitly, suppose for example that
▲:<math>f_j = X(\omega_n^j) = X(z) \mod (z - \omega_n^j)</math>
''F''<sub>''k''</sub>(''z''), then computing ''
''F''<sub>''k'',''j''</sub>(''z''), and so on, recursively creating more and more remainder polynomials of smaller and smaller degree until one arrives at the final degree-0 results.▼
Moreover, as long as the polynomial factors at each stage are [[relatively prime polynomials|relatively prime]] (which for polynomials means that they have no common roots), one can construct a dual algorithm by reversing the process with the [[Chinese
▲where '''mod''' ([[modulo]]) denotes the polynomial remainder operation. The key to fast algorithms like Bruun's or Cooley-Tukey comes from the fact that one can perform this set of ''n'' remainder operations in recursive stages.
▲== Recursive factorizations and FFTs ==
The standard decimation-in-frequency (DIF) radix-''r''
▲In order to compute the DFT, we need to evaluate the remainder of ''X''(''z'') modulo ''n'' [[monomial|monomials]] as described above. Evaluating these remainders one by one is equivalent to the evaluating the usual DFT formula directly, and requires O(''n''<sup>2</sup>) operations. However, one can ''combine'' these remainders recursively to reduce the cost, using the following trick: if we want to evaluate ''X''(''z'') modulo two polynomials ''U''(''z'') and ''V''(''z''), we can first take the remainder modulo their product ''U''(''z'') ''V''(''z''), which reduces the [[degree]] of the polynomial ''X''(''z'') and makes subsequent modulo operations less computationally expensive.
== The Bruun factorization ==▼
▲The product of all of the monomials (''z'' - ω<sub>''n''</sub><sup>''j''</sup>) for ''j''=0..''n''-1 is simply ''z''<sup>''n''</sup>-1 (whose roots are clearly the ''n'' roots of unity). One then wishes to find a recursive factorization of ''z''<sup>''n''</sup>-1 into polynomials of few terms and smaller and smaller degree. To compute the DFT, one takes ''X''(''z'') modulo each level of this factorization in turn, recursively, until one arrives at the monomials and the final result. If each level of the factorization splits every polynomial into an O(1) (constant-bounded) number of smaller polynomials, each with an O(1) number of nonzero coefficients, then the modulo operations for that level take O(''n'') time; since there will be a logarithmic number of levels, the overall complexity is O(''n'' log ''n'').
The basic Bruun algorithm for [[power of two|powers of two]] ''N''=''2''<sup>''n''</sup> factorizes ''z''<sup>''2''<sup>''n''</sup></sup>-''1'' recursively via the rules:▼
▲More explicitly, suppose for example that ''z''<sup>''n''</sup>-1 = ''F''<sub>1</sub>(''z'') ''F''<sub>2</sub>(''z'') ''F''<sub>3</sub>(''z''), and that ''F''<sub>''k''</sub>(''z'') = ''F''<sub>''k'',1</sub>(''z'') ''F''<sub>''k'',2</sub>(''z''), and so on. The corresponding FFT algorithm would consist of first computing ''X''<sub>''k''</sub>(''z'') = ''X''(''z'') mod
▲''F''<sub>''k''</sub>(''z''), then computing ''X''<sub>''k'',''j''</sub>(''z'') = ''X''<sub>''k''</sub>(''z'') mod
▲''F''<sub>''k'',''j''</sub>(''z''), and so on, recursively creating more and more remainder polynomials of smaller and smaller degree until one arrives at the final degree-0 results.
▲Moreover, as long as the polynomial factors at each stage are [[relatively prime]] (which for polynomials means that they have no common roots), one can construct a dual algorithm by reversing the process with the [[Chinese Remainder Theorem]].
where ''a'' is a real constant with |''a''| ≤ 2. If <math>a=2\cos(\phi)</math>, <math>\phi\in(0,\pi)</math>, then <math>\sqrt{2+a}=2\cos\tfrac\phi2</math> and <math>\sqrt{2-a}=2\cos(\tfrac\pi 2-\tfrac\phi 2)</math>.
▲====Cooley-Tukey as polynomial factorization====
At stage ''s'', ''s''=0,1,2,''n''-1, the intermediate state consists of ''2''<sup>''s''</sup> polynomials <math>p_{s,0},\dots,p_{s,2^s-1}</math> of degree ''2''<sup>''n''-''s''</sup> - ''1'' or less , where
▲The standard decimation-in-frequency (DIF) radix-''r'' Cooley-Tukey algorithm corresponds closely to a recursive factorization. For example, radix-2 DIF Cooley-Tukey factors ''z''<sup>''n''</sup>-1 into ''F''<sub>1</sub> = (''z''<sup>''n''/2</sup>-1) and ''F''<sub>2</sub> = (''z''<sup>''n''/2</sup>+1). These modulo operations reduce the degree of ''X''(''z'') by 2, which corresponds to dividing the problem size by 2. Instead of recursively factorizing ''F''<sub>2</sub> directly, though, Cooley-Tukey instead first computes ''X''<sub>2</sub>(''z'' ω<sub>''n''</sub>), shifting all the roots (by a ''twiddle factor'') so that it can apply the recursive factorization of ''F''<sub>1</sub> to both subproblems. That is, Cooley-Tukey ensures that all subproblems are also DFTs, whereas this is not generally true for an arbitrary recursive factorization (such as Bruun's, below).
<math display="block">\begin{align}
p_{s,0}(z)&= p(z) \mod \left(z^{2^{n-s}}-1\right)&\quad&\text{and}\\
p_{s,m}(z) &= p(z)\mod \left(z^{2^{n-s}}-2\cos\left(\tfrac{m}{2^s}\pi\right)z^{2^{n-1-s}}+1\right)&m&=1,2,\dots,2^s-1
\end{align}</math>
By the construction of the factorization of ''z''<sup>''2''<sup>''n''</sup></sup>-''1'', the polynomials ''p''<sub>''s'',''m''</sub>(''z'') each encode 2<sup>''n''-''s''</sup> values
▲== The Bruun factorization ==
<math display="block">X_k=p(e^{2\pi i\tfrac{k}{2^n}})</math>
of the Fourier transform, for ''m''=0, the covered indices are ''k''=''0'', 2<sup>''k''</sup>, 2∙2<sup>''s''</sup>, 3∙2<sup>''s''</sup>,..., (2<sup>''n''-''s''</sup>-1)∙2<sup>''s''</sup>, for ''m''>''0'' the covered indices are ''k''=''m'', 2<sup>''s''+1</sup>-''m'', 2<sup>''s''+1</sup>+''m'', 2∙2<sup>''s''+1</sup>-''m'', 2∙2<sup>''s''+1</sup>+''m'', ..., 2<sup>''n''</sup>-''m''.
During the transition to the next stage, the polynomial <math>p_{s,\ell}(z)</math> is reduced to the polynomials <math>p_{s+1,\ell}(z)</math> and <math>p_{s+1,2^s-\ell}(z)</math> via polynomial division. If one wants to keep the polynomials in increasing index order, this pattern requires an implementation with two arrays. An implementation in place produces a predictable, but highly unordered sequence of indices, for example for ''N''=16 the final order of the 8 linear remainders is (0, 4, 2, 6, 1, 7, 3, 5).
▲The basic Bruun algorithm for [[power of two|powers of two]] factorizes ''z''<sup>''n''</sup>-1 recursively via the rules:
At the end of the recursion, for {{math|1=''s'' = ''n''-1}}, there remain {{math|2<sup>''n''-1</sup>}} linear polynomials encoding two Fourier coefficients {{math|''X''<sub>''0''</sub>}} and {{math|''X''<sub>2<sup>''n''-1</sup></sub>}} for the first and for the any other {{mvar|k}}th polynomial the coefficients {{math|''X''<sub>''k''</sub>}} and {{math|''X''<sub>2<sup>''n''</sup>-''k''</sub>}}.
▲:<math>z^{2m}-1 = (z^m - 1) (z^m + 1)</math>
▲:<math>z^{4m} + az^{2m} + 1 = (z^{2m} + \sqrt{2-a}z^m+1) (z^{2m} - \sqrt{2-a}z^m + 1)</math>
Moreover, since all of these polynomials have purely real coefficients (until the very last stage), they automatically exploit the special case where the inputs ''x''<sub>''
The Bruun factorization, and thus the Bruun FFT algorithm, was generalized to handle arbitrary ''even'' composite lengths, i.e. dividing the polynomial degree by an arbitrary ''radix'' (factor), as follows.
\end{cases} </math>
Note that all of the polynomials that appear in the Bruun factorization above can be written in this form. The zeroes of these polynomials are <math>e^{2\pi i ( \pm\alpha + k ) / N}</math> for <math>k = 0, 1, \dots, N-1</math> in the <math>\alpha \neq 0</math> case, and <math>e^{2\pi i k / 2N}</math> for <math>k = 0, 1, \dots, 2N-1</math> in the <math>\alpha = 0</math> case. Hence these polynomials can be recursively factorized for a factor (radix) {{mvar|r}} via:
▲:<math>\phi_{n, \alpha}(z) =
▲z^{2n} - 2 \cos (2 \pi \alpha) z^n + 1 & \mbox{if } 0 < \alpha < 1 \\ \\
▲z^{2n} - 1 & \mbox{if } \alpha = 0
▲:<math>\phi_{rm, \alpha}(z) =
\end{cases} </math>
▲\prod_{\ell=0}^{r-1} \phi_{m,(\alpha+\ell)/r} & \mbox{if } 0 < \alpha \leq 0.5 \\ \\
▲\prod_{\ell=0}^{r-1} \phi_{m,(1-\alpha+\ell)/r} & \mbox{if } 0.5 < \alpha < 1 \\ \\
▲\prod_{\ell=0}^{r-1} \phi_{m,\ell/(2r)} & \mbox{if } \alpha = 0
==References==
{{refbegin}}
* {{cite journal | first = Georg | last = Bruun
* {{cite book | first = H. J. | last = Nussbaumer
* {{cite journal | first = Yuhang | last = Wu
* {{cite book | first1 = Jianping | last1 = Chen
* {{cite journal | first = Rainer | last = Storn
* {{cite journal | first = Hideo | last = Murakami
* {{cite book | first = Hideo | last = Murakami | title = 1996 IEEE International Conference on Acoustics,
* {{cite book |doi=10.1007/978-3-540-73625-7_39 |chapter=A Comparative Study of Different FFT Architectures for Software Defined Radio |title=Embedded Computer Systems: Architectures, Modeling, and Simulation |series=Lecture Notes in Computer Science |date=2007 |last1=Mittal |first1=Shashank |last2=Khan |first2=Md. Zafar Ali |last3=Srinivas |first3=M. B. |volume=4599 |pages=375–384 |isbn=978-3-540-73622-6 }}
{{refend}}
[[Category:FFT algorithms]]
|