|
Given a function h(t), its
Fourier transform H(f)
is:
|
 |
[1] |
where i is the
imaginary square root of
–1. The Fourier transform H is a function of some other variable
f. The process can be reversed at any point t where h
is continuous by taking the
inverse
Fourier transform:
|
 |
[2] |
This may seem abstract, but Fourier transforms are widely
used in practical applications. The classic example is signal
processing. A signal can be represented as a function of time t
or as a function of frequency f. You switch between the two
representations by applying the Fourier transform or inverse Fourier
transform.
Fourier transforms are also used to solve partial
differential equations. Accordingly, they are used in applications where
partial differential equations arise, such as physics and financial
engineering.
Many software packages numerically evaluate Fourier
transforms and their inverses. Results will be poor (often downright
wrong) if the software employs standard techniques of numerical
integration to evaluate integrals [1] and [2].
Such techniques are ill suited to the oscillatory integrands encountered
with Fourier transforms. Effective software employs a technique known as
the
fast Fourier transform (FFT).
This algorithm was discovered by Cooley and Tukey (1965).
It runs rapidly and provides excellent results. It was one of the most
significant discoveries in applied mathematics in the latter part of the
20th century. It revolutionized telecommunications. See
Brigham (1988)
for a discussion of Fourier transforms and the fast Fourier transform.
If you use off-the-shelf software to value Fourier
transforms, be aware that the definitions of the Fourier transform and
inverse Fourier transform are not standardized. Check your software
literature for the precise definition it uses, and modify output if
necessary.
To illustrate the use of fast Fourier transform software,
consider the
function:
|
 |
[3] |
which is graphed in Exhibit 1:
|
|
 |
 |
|
The graph of function [3]
is indicated. The example of this section explains how to use fast
Fourier transform software to take its Fourier transform. |
Although the function is defined for all
real numbers, it can only be input to
fast Fourier transform software on a finite interval. For this example,
the interval considered is [–3,3]. Whatever interval you choose, it
should be large enough to capture what is “important” about the
function. To avoid an effect called aliasing, choose an interval such
that the function equals 0—or almost 0—at the end points. The fast
Fourier transform software treats the function as periodic, as
illustrated in Figure 3.
|
|
 |
 |
|
fast Fourier transform software treats
your input function as one period of a periodic function that
repeats continually on the real number line. This is illustrated
with three periods for the function [3], which is
depicted in Exhibit 1. |
Because of this imputed periodicity, you can shift the
interval over which you input the function to the fast Fourier transform
software. For technical reasons, you want to shift it so the left
end-point is 0. For this example, the interval [0,6] is used instead of
[–3,3] to input function [3] to the fast Fourier
transform software. Described in this manner, the function appears as in
Exhibit 3. Note that the function in Exhibit 3 is different from
function [3], but it communicates the same
information.
|
|
 |
 |
|
Since fast Fourier transform software
treats functions as periodic, you may shift the interval over which
you input the function. For technical reasons, you want to shift the
interval so that its left end point is 0. In the example, the
interval [0,6] is used. |
Now sample (evaluate) the function at a
set of n
evenly spaced values for t on the interval [0,6]. The number n
of sampled values must be a power of 2. Let’s sample 25 = 32
values. Let Δ = 6/32 = .1875 be the
sample interval. Note that you sample at the left end-point but not the
right end-point. In the example, the function is sampled at t = 0
but not at t = 6.
Output from the fast Fourier transform software comprises
n values that are proportional to values of the Fourier transform
H(f). To make them equal to H(f), multiply by
Δ. Example results are indicated in
Exhibit 4:
|
|
 |
|
t |
h(t) |
f |
H(f) |
 |
t |
h(t) |
f |
H(f) |
|
0.0000 |
1.0 |
0.0000 |
3.9375 |
3.0000 |
0.0 |
-2.6667 |
0.1875 |
|
0.1875 |
1.0 |
0.1667 |
1.6871 |
3.1875 |
0.0 |
-2.5000 |
-0.0888 |
|
0.3750 |
1.0 |
0.3333 |
-0.7991 |
3.3750 |
0.0 |
-2.3333 |
-0.1062 |
|
0.5625 |
1.0 |
0.5000 |
-0.0633 |
3.5625 |
0.0 |
-2.1667 |
0.1950 |
|
0.7500 |
1.0 |
0.6667 |
0.4527 |
3.7500 |
0.0 |
-2.0000 |
-0.0777 |
|
0.9375 |
1.0 |
0.8333 |
-0.3075 |
3.9375 |
0.0 |
-1.8333 |
-0.1349 |
|
1.1250 |
1.0 |
1.0000 |
-0.0658 |
4.1250 |
1.0 |
-1.6667 |
0.2212 |
|
1.3125 |
1.0 |
1.1667 |
0.2828 |
4.3125 |
1.0 |
-1.5000 |
-0.0704 |
|
1.5000 |
1.0 |
1.3333 |
-0.1875 |
4.5000 |
1.0 |
-1.3333 |
-0.1875 |
|
1.6875 |
1.0 |
1.5000 |
-0.0704 |
4.6875 |
1.0 |
-1.1667 |
0.2828 |
|
1.8750 |
1.0 |
1.6667 |
0.2212 |
4.8750 |
1.0 |
-1.0000 |
-0.0658 |
|
2.0625 |
0.0 |
1.8333 |
-0.1349 |
5.0625 |
1.0 |
-0.8333 |
-0.3075 |
|
2.2500 |
0.0 |
2.0000 |
-0.0777 |
5.2500 |
1.0 |
-0.6667 |
0.4527 |
|
2.4375 |
0.0 |
2.1667 |
0.1950 |
5.4375 |
1.0 |
-0.5000 |
-0.0633 |
|
2.6250 |
0.0 |
2.3333 |
-0.1062 |
5.6250 |
1.0 |
-0.3333 |
-0.7991 |
|
2.8125 |
0.0 |
2.5000 |
-0.0888 |
5.8125 |
1.0 |
-0.1667 |
1.6871 |
|
 |
|
Example inputs to the fast Fourier
transform software comprise 32 values for h(t),
adjusted as described in the text. Outputs comprise 32 values for
H(f). Corresponding values for t and f are
also indicated, although these are generally not included in inputs
or outputs for fast Fourier transform software. |
Your fast Fourier transform software is likely to accept
as inputs only the values for h(t) and provide as outputs
only the values proportional to
H(f). This means you will need to infer the corresponding
values for f from the values for t. The first value for
f is 0. Subsequent values are spaced
apart. At the half-way point, the f values cycle back to the
negative
f-axis. In the above example, the 17th value for f
equals –2.6667 instead of 2.6667. This cycling is related to
periodicity.
The fast Fourier transform is a numerical technique, so
results are not exact. Exhibit 5 compares results of Exhibit 4 with the
actual Fourier transform H(f) of h(t). In
this example, results are excellent. You can improve results by sampling
at a greater number n of values for t.
|
|
 |
 |
|
Example results obtained with fast Fourier
transform software are compared with the actual Fourier transform of
function [3]. In this case, the match is
excellent. |
When sampling a function h(t), the number
n of values you sample as well as their spacing
Δ should be chosen based upon the
complexity of the graph of h. In the example, h had a
simple graph, so sampling n = 32 points was sufficient. In
probabilistic applications, you may deal with functions that oscillate
wildly. Such functions need to be sampled at sufficiently many values to
capture that oscillation. Otherwise, the fast Fourier transform will
produce erroneous results. It is not uncommon to sample at 512 or more
values.
|
|