0% found this document useful (0 votes)
50 views

Lecture Notes 4: Fourier Analysis: Definitions

The document defines the Fourier transform and inverse Fourier transform, showing how a function can be represented as a combination of complex sinusoids of different frequencies. It discusses properties like linearity and scaling. The sampling theorem states that a signal can be reconstructed from samples if it is bandwidth limited below the Nyquist frequency, otherwise aliasing occurs. The discrete Fourier transform (DFT) approximates the continuous Fourier transform using a finite number of samples. While a direct calculation of the DFT requires O(N^2) operations, the fast Fourier transform (FFT) can compute it in only O(NlogN) time using a divide-and-conquer approach.

Uploaded by

Ijaz Talib
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views

Lecture Notes 4: Fourier Analysis: Definitions

The document defines the Fourier transform and inverse Fourier transform, showing how a function can be represented as a combination of complex sinusoids of different frequencies. It discusses properties like linearity and scaling. The sampling theorem states that a signal can be reconstructed from samples if it is bandwidth limited below the Nyquist frequency, otherwise aliasing occurs. The discrete Fourier transform (DFT) approximates the continuous Fourier transform using a finite number of samples. While a direct calculation of the DFT requires O(N^2) operations, the fast Fourier transform (FFT) can compute it in only O(NlogN) time using a divide-and-conquer approach.

Uploaded by

Ijaz Talib
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Lecture notes 4: Fourier Analysis

Definitions
There are many common (and confusing, but ultimately trivial!) differences in
defining the Fourier transform. One common defintion is
Z ∞
F (ν) = f (t)e−i2πνt dt
−∞

Thus F (ν) gives the wavenumber representation of the function f (t). The in-
verse transform can be written
Z ∞
f (t) = F (ν)ei2πνt dν
−∞

F (ν) is in general a complex function whose interpretation may be aided by


expression in the polar coordinate form F (ν) = A(ν)eiφ(ν) , where A(ν) and φ(ν)
are real functions where A(ν) =| F (ν) | is the amplitude and φ(ν) = arg[F (ν)]
is the phase. Note that we then can write the inverse transform as
Z ∞
f (t) = A(ν)ei[2πνt+φ(ν)] dν,
−∞

which is seen to be a recombination of all the frequency components of f(t).


Each component is a complex sinusoid of the form e2πiνt whose amplitude is
A(ν) and whose initial phase (at t = 0) is φ(ν). This interpretation of the
Fourier transform clearly shows its relation to the Fourier series1

a0 X
f (x) = + [an cos(nx) + bn sin(nx)]
2 n=1

with coefficients given by

1 π
Z
an = f (x) cos(nx)dx
π −π
1 π
Z
bn = f (x) sin(nx)dx.
π −π

It is common to perform the substitution ν = ω/2π which gives


Z ∞
F (ω) = f (t)eiωt dt
−∞
Z ∞
1
f (ω) = F (t)eiωt dω
2π −∞
1 Note that by using Euler’s formula einx = cos(nx)+i sin(nx) a more concise (and modern)
P∞ 1
R∞
form can be used: f (x) = n=−∞ n
c einx with cn = 2π f (x)e−inx dx.
−∞

1
Properties
Fourier transforms exhibit a number of properties that are very useful:
• Linearity
af (t) + bg(t) ⇐⇒ aF (ω) + bG(ω)
• Multiplication
1
f (t)g(t) ⇐⇒ (F ⊗ G)(ω)

where we define the convolution ⊗ as
Z ∞
K(ω) ≡ F (ω 0 )G(ω − ω 0 )dω 0
−∞

• Convolution
(f ⊗ g)(t) ⇐⇒ F (ω)G(ω)
• Conjugation
f (t) ⇐⇒ F (−ω)
• Scaling
1 ω 
f (at) ⇐⇒ F
|a| a
• Time reversal
f (−t) ⇐⇒ F (−ω)
• Time shift
f (t − t0 ) ⇐⇒ e−iωt0 F (ω)
• Parsevals theorem
Z ∞ Z ∞
1
f (t)g(t)dt = F (ω)G(ω)dω
−∞ 2π −∞

Sampling Theorem and Aliasing


We will in general be dealing with functins h(t) which are sampled at evenly
spaced intervals in time (or space). Let ∆ denote the time (space) interval
between consequtive samples.
For any sampling interval ∆, there is a special frequency νc called the Nyquist
frequency given by
1
νc ≡
2∆
The critical sampling of a sine wave is two sample points per cycle. There are
two aspects of the critical frequency. First, if the original signal is bandwith
limited to frequencies smaller than νc then the function is completely determined
by its discrete samples. This is the sampling theorem. However, if a signal is
not bandwidth limited to less than the Nyquist frequency then the power that
lies outside the range −νc < ν < νc is spuriously moved into that range. This
phenomena is called aliasing.

2
FFTs
Let us now estimate a Fourier transform from a finite number of sampled points.
Suppose that we have N conscutive sampled values
hk ≡ h(tk ) tk ≡ k∆ k = 0, 1, 2, . . . , N − 1
so that the sampling interval is ∆. Also assume N is even. With N numbers
of input, we cannot produce more than N independent numbers of output. So,
instead of trying to estimate the Fourier transform H(ν) at all values of ν in
the range −νc to νc , let us seek estimates at only the discrete values
n −N N
νn ≡ , n= ,...,
N∆ 2 2
The extreme values of n correspond to the lower and upper values fo the Nyquist
critical frequency range.
The remaining step is to approximate the continuous tranform by a discrete
sum
Z ∞ N
X −1 N
X −1
2πiνn t 2πiνn tk
H(νn ) = h(t)e dt ≈ hk e ∆=∆ hk e2πikn/N
−∞ k=0 k=0

The final summation is called the discrete Fourier transform of the N points
hk . Let us denote it by Hn :
N
X −1
Hn ≡ hk e2πikn/N (1)
k=0

Up to now we have taken the view that index n varies from −N/2 to N/2.
However, since it is clear that equation 1 is periodic in n we also have that
H−n = HN −1 . With this in mind it is customary to let n vary from 0 to N − 1
(one period). When this convention is followed the zero frequency corresponds
to n = 0, positive frequencies 0 < ν < νc correspond to valuses 1 ≤ n ≤ N/2−1,
while negative frequencies −νc < ν < 0 correspond to N/21 ≤ n ≤ N − 1. The
value n = N/2 corresponds to both ν = νc and ν = −νc .
The discrete inverse transform which recovers hk form the Hn is
N −1
1 X
hk = Hn e−2πikn/N
N n=0

How do we implement the discrete transform in code? The brute strength


approach takes of order N 2 operations: Define W as the complex nubmer
W ≡ e2πi/N
Then equation 1 can be written
N
X −1
Hn = W nk hk ,
k=0

3
i.e. the vector hk is multiplied by a matrix whose (h, k)th element is the constant
W to the power n × k. The matrix multiplication produces a vector result
whose components are Hn . This multiplication evidently needs N 2 complex
multiplications.
In fact, the discrete Fourier transform can be achieved in N log2 N opera-
tions with an algorithm called the it Fast Fourier Transform or FFT. Here is
one derivation of the FFT, that of Danielson and Lanczos in 1942. They showed
that a discrete transform of length N can be rewritten as the sum of two dis-
crete transforms, each of length N/2. One of the two is formed from the even
numbered points of the original N , the other from the odd-numbered points.
N
X −1
Fk = e2πijk/N fj
j=0
N/2−1 N/2−1
X X
= e2πi2jk/N f2j + e2πi(2j+1)k/N f2j+1
j=0 j=0
N/2−1 N/2−1
X X
2πijk/(N/2) k
= e f2j + W e2πijk/(N/2) f2j+1
j=0 j=0

= Fke + W k Fko

Fke denotes the k th component of the Fourier transform of length (N/2) formed
from the even components of the original fj , while Fko is the corresponding
transform of lenght (N/2) from the odd components.
This procedure can be applied recursively; having reduced the problem of
computing Fk to that of computing Fke and Fko , one can do the same reduction
of Fke to the problem of computing the transform of its N/4 even-numbered
inputs data, Fkee , and N/4 odd-numbered data Fkeo . When we start with an
original N which is a integer power of 2 (one should only use FFTs with N a
power of 2, padding the input data with zeroes is necessary) we can continue
applying the Danielson-Lanczos method until the original data is subdivided all
the way down to transforms of length one. The Fourier transfrom of lenght one
is just the identity operation that copies its one input number into its output
slot. Thus, for every pattern of e’s and o’s numbering log2 N in all there is a
one-point transform that is given by

Fkeoeeoeo···oee = fn for some n

Which value of n corresponds to which pattern? Reverse the pattern of e’s and
o’s, let e = 0 and o = 1 and one will have, in binary, the value of n. This is
because the successive subdivisions of the data into odd and even are tests of
successive least significant bits of n. Thus by rearranging the input vector fj in
bit reversed order so that the indivdual numbers are in the order obtained by bit
reversing j. The points are given as one-point transforms. These are recombined
with the adjacent number to give two-point transforms, then combine adjacent

4
pairs again to give 4-point transforms, and so on, using the Danielson-Lanczos
formula at every step.
The FFT therefore has a structure where first the data are sorted into bit
reversed order and thereafter the transforms of length 2, 4, 8, /ldots, N are com-
puted implementing the Danielson-Lanczos formula.

Exercises
Experiment with the fft function in idl. First make an x-axis, eg idl>
x=findgen(2000)/100.*2.*!pi

1. Compute the amplitude of the transform of f = sin x. In plotting this


amplitude, what should be used for the x-axis?

2. What happens if you set the edges of f to zero: eg multiply f by a step-


function s such as idl> s=fltarr(2000) & s[200:1800]=1.0? Overplot
the amplitude of the tranform as you narrow the region of s that is equal
to one.

3. Compute the transform of step-functions of various widths.

4. Add sinusoidal functions to f with different frequencies and check the


resulting transforms. What happens to the transform if you add a constant
to f ?

5. Consider a function g given by the sum of three sinusoidals of differing


frequency. Construct such a g and remove one of the frequencies from g
using forward and back transforms FFT’s in idl.

You might also like