Rader's FFT Algorithm
   HOME

TheInfoList



OR:

Rader's algorithm (1968), named for Charles M. Rader of
MIT Lincoln Laboratory The MIT Lincoln Laboratory, located in Lexington, Massachusetts, is a United States Department of Defense federally funded research and development center chartered to apply advanced technology to problems of national security. Research and dev ...
, is a
fast Fourier transform A fast Fourier transform (FFT) is an algorithm that computes the discrete Fourier transform (DFT) of a sequence, or its inverse (IDFT). Fourier analysis converts a signal from its original domain (often time or space) to a representation in th ...
(FFT) algorithm that computes the
discrete Fourier transform In mathematics, the discrete Fourier transform (DFT) converts a finite sequence of equally-spaced samples of a function into a same-length sequence of equally-spaced samples of the discrete-time Fourier transform (DTFT), which is a complex- ...
(DFT) of
prime A prime number (or a prime) is a natural number greater than 1 that is not a product of two smaller natural numbers. A natural number greater than 1 that is not prime is called a composite number. For example, 5 is prime because the only ways ...
sizes by re-expressing the DFT as a cyclic
convolution In mathematics (in particular, functional analysis), convolution is a operation (mathematics), mathematical operation on two function (mathematics), functions ( and ) that produces a third function (f*g) that expresses how the shape of one is ...
(the other algorithm for FFTs of prime sizes, Bluestein's algorithm, also works by rewriting the DFT as a convolution). Since Rader's algorithm only depends upon the periodicity of the DFT kernel, it is directly applicable to any other transform (of prime order) with a similar property, such as a
number-theoretic transform In mathematics, the discrete Fourier transform over a ring generalizes the discrete Fourier transform (DFT), of a function whose values are commonly complex numbers, over an arbitrary ring. Definition Let R be any ring, let n\geq 1 be an integer, ...
or the
discrete Hartley transform A discrete Hartley transform (DHT) is a Fourier-related transform of discrete, periodic data similar to the discrete Fourier transform (DFT), with analogous applications in signal processing and related fields. Its main distinction from the DFT is ...
. The algorithm can be modified to gain a factor of two savings for the case of DFTs of real data, using a slightly modified re-indexing/permutation to obtain two half-size cyclic convolutions of real data; an alternative adaptation for DFTs of real data uses the
discrete Hartley transform A discrete Hartley transform (DHT) is a Fourier-related transform of discrete, periodic data similar to the discrete Fourier transform (DFT), with analogous applications in signal processing and related fields. Its main distinction from the DFT is ...
.Matteo Frigo and Steven G. Johnson,
The Design and Implementation of FFTW3
" ''Proceedings of the IEEE'' 93 (2), 216–231 (2005).
Winograd extended Rader's algorithm to include prime-power DFT sizes p^m, and today Rader's algorithm is sometimes described as a special case of Winograd's FFT algorithm, also called the ''multiplicative Fourier transform algorithm'' (Tolimieri et al., 1997), which applies to an even larger class of sizes. However, for
composite Composite or compositing may refer to: Materials * Composite material, a material that is made from several different substances ** Metal matrix composite, composed of metal and other parts ** Cermet, a composite of ceramic and metallic materials ...
sizes such as prime powers, the
Cooley–Tukey FFT algorithm The Cooley–Tukey algorithm, named after J. W. Cooley and John Tukey, is the most common fast Fourier transform (FFT) algorithm. It re-expresses the discrete Fourier transform (DFT) of an arbitrary composite size N = N_1N_2 in terms of ''N''1 ...
is much simpler and more practical to implement, so Rader's algorithm is typically only used for large-prime base cases of Cooley–Tukey's
recursive Recursion (adjective: ''recursive'') occurs when a thing is defined in terms of itself or of its type. Recursion is used in a variety of disciplines ranging from linguistics to logic. The most common application of recursion is in mathematics ...
decomposition of the DFT.


Algorithm

Begin with the definition of the discrete Fourier transform: : X_k = \sum_^ x_n e^ \qquad k = 0,\dots,N-1. If ''N'' is a prime number, then the set of non-zero indices n \in \ forms a
group A group is a number of persons or things that are located, gathered, or classed together. Groups of people * Cultural group, a group whose members share the same cultural identity * Ethnic group, a group whose members share the same ethnic iden ...
under multiplication
modulo In computing, the modulo operation returns the remainder or signed remainder of a division, after one number is divided by another (called the '' modulus'' of the operation). Given two positive numbers and , modulo (often abbreviated as ) is t ...
''N''. One consequence of the
number theory Number theory (or arithmetic or higher arithmetic in older usage) is a branch of pure mathematics devoted primarily to the study of the integers and arithmetic function, integer-valued functions. German mathematician Carl Friedrich Gauss (1777â ...
of such groups is that there exists a
generator Generator may refer to: * Signal generator, electronic devices that generate repeating or non-repeating electronic signals * Electric generator, a device that converts mechanical energy to electrical energy. * Generator (circuit theory), an eleme ...
of the group (sometimes called a primitive root, which can be found by exhaustive search or slightly better algorithmsDonald E. Knuth, ''The Art of Computer Programming, vol. 2: Seminumerical Algorithms'', 3rd edition, section 4.5.4, p. 391 (Addison–Wesley, 1998).). This generator is an integer ''g'' such that n = g^q \pmod N for any non-zero index ''n'' and for a unique q \in \ (forming a
bijection In mathematics, a bijection, also known as a bijective function, one-to-one correspondence, or invertible function, is a function between the elements of two sets, where each element of one set is paired with exactly one element of the other s ...
from ''q'' to non-zero ''n''). Similarly, k = g^ \pmod N for any non-zero index ''k'' and for a unique p \in \, where the negative exponent denotes the
multiplicative inverse In mathematics, a multiplicative inverse or reciprocal for a number ''x'', denoted by 1/''x'' or ''x''−1, is a number which when Multiplication, multiplied by ''x'' yields the multiplicative identity, 1. The multiplicative inverse of a rat ...
of g^p \mod N. That means that we can rewrite the DFT using these new indices ''p'' and ''q'' as: : X_0 = \sum_^ x_n, : X_ = x_0 + \sum_^ x_ e^ \qquad p = 0,\dots,N-2. (Recall that ''x''''n'' and ''X''''k'' are implicitly periodic in ''N'', and also that e^=1 (
Euler's identity In mathematics, Euler's identity (also known as Euler's equation) is the equality e^ + 1 = 0 where : is Euler's number, the base of natural logarithms, : is the imaginary unit, which by definition satisfies , and : is pi, the ratio of the circum ...
). Thus, all indices and exponents are taken modulo ''N'' as required by the group arithmetic.) The final summation, above, is precisely a cyclic convolution of the two sequences ''a''''q'' and ''b''''q'' (of length ''N''–1, because q \in \) defined by: :a_q = x_ :b_q = e^.


Evaluating the convolution

Since ''N''–1 is composite, this convolution can be performed directly via the
convolution theorem In mathematics, the convolution theorem states that under suitable conditions the Fourier transform of a convolution of two functions (or signals) is the pointwise product of their Fourier transforms. More generally, convolution in one domain (e.g. ...
and more conventional FFT algorithms. However, that may not be efficient if ''N''–1 itself has large prime factors, requiring recursive use of Rader's algorithm. Instead, one can compute a length-(''N''–1) cyclic convolution exactly by zero-padding it to a length of at least 2(''N''–1)–1, say to a
power of two A power of two is a number of the form where is an integer, that is, the result of exponentiation with number two as the base and integer  as the exponent. In a context where only integers are considered, is restricted to non-negative ...
, which can then be evaluated in O(''N'' log ''N'') time without the recursive application of Rader's algorithm. This algorithm, then, requires O(''N'') additions plus O(''N'' log ''N'') time for the convolution. In practice, the O(''N'') additions can often be performed by absorbing the additions into the convolution: if the convolution is performed by a pair of FFTs, then the sum of ''x''''n'' is given by the DC (0th) output of the FFT of ''a''''q'' plus ''x''0, and ''x''0 can be added to all the outputs by adding it to the DC term of the convolution prior to the inverse FFT. Still, this algorithm requires intrinsically more operations than FFTs of nearby composite sizes, and typically takes 3–10 times as long in practice. If Rader's algorithm is performed by using FFTs of size ''N''–1 to compute the convolution, rather than by zero padding as mentioned above, the efficiency depends strongly upon ''N'' and the number of times that Rader's algorithm must be applied recursively. The worst case would be if ''N''–1 were 2''N''2 where ''N''2 is prime, with ''N''2–1 = 2''N''3 where ''N''3 is prime, and so on. In such cases, supposing that the chain of primes extended all the way down to some bounded value, the recursive application of Rader's algorithm would actually require O(''N''2) time{{Dubious, Time complexity without zero-padding, date=January 2021. Such ''N''j are called
Sophie Germain prime In number theory, a prime number ''p'' is a if 2''p'' + 1 is also prime. The number 2''p'' + 1 associated with a Sophie Germain prime is called a . For example, 11 is a Sophie Germain prime and 2 × 11 +  ...
s, and such a sequence of them is called a
Cunningham chain In mathematics, a Cunningham chain is a certain sequence of prime numbers. Cunningham chains are named after mathematician A. J. C. Cunningham. They are also called chains of nearly doubled primes. Definition A Cunningham chain of the first kin ...
of the first kind. The lengths of Cunningham chains, however, are observed to grow more slowly than log2(''N''), so Rader's algorithm applied in this way is probably not O(''N''2), though it is possibly worse than O(''N'' log ''N'') for the worst cases. Fortunately, a guarantee of O(''N'' log ''N'') complexity can be achieved by zero padding.


References

FFT algorithms