Вы находитесь на странице: 1из 16

Fourier Transforms

The Discrete Fourier Transform


CS370 Lecture 18 February 13, 2017

1
Assignment Reminder
A2 due Thursday at 4pm.

Same submission rules apply:


Written/analytical work and output figures etc. to the physical box.
One zip file of all code to LEARN DropBox.

Be careful: 50% penalty for 1-day late submissions! (Zero after that.)

2
Fourier Series reminder
We saw that the Fourier series expansion of any function ,
+

=
=
expresses it as a sum of scaled sinusoids of increasing and frequency.
Lowest frequency
High frequency = 0 High frequency
- +

The necessary coefficients are given by solving integrals:


2
1
=
2
0

3
Fourier Series Truncating
An approximation of a function could be achieved by truncating the
series to a finite number of sinusoids:

Today, well extend these ideas to discrete data, rather than functions.

4
Two FT Demo Applications by David.Li

Fourier Image Editing: http://david.li/filtering/ FFT-Based Wave Simulation: http://david.li/waves/

5
Discrete Input Data
Consider a vector of discrete data.
e.g., f0 , 1 , 2 , 3 , , 1 for N uniformly
spaced data points (N assumed even).

Assume data are from an unknown


function (), evaluated at each

= = for = 0,1, , 1.
N=128 discrete data samples over a domain [0,32].
i.e., = ( ).

6
Discrete Fourier Transform
as interpolation
We have N = 128 points, and period T = 32.

For N points, we will use N degrees of freedom (i.e.,


N coefficients) to exactly interpolate the data.
N=128 discrete data samples over a domain [0,32].

Assuming N is even, we can approximate with a


truncated Fourier series as:
/2
2


2 +1

7
Piecewise linear plot.
Discrete Fourier Transform
Plugging in each of our N data points , into the expression

2
2


= 2 +1
will give us N equations, involving unknowns coefficients, .

This will lead to our Discrete Fourier Transform, which well start
deriving.
Derivation time!
Wahoo!

8
W is an Nth Root of Unity
since it satisfies = 2 = 1.
Discrete Fourier Transform
2
For notational convenience we have defined = .

1 1
2

= = .
=0 =0

Our discrete data is now a sum of coefficients , multiplied by


corresponding complex exponentials .

9
Roots of Unity
2
With = , then
2
=
is an Nth root of unity, for all integers .
2
3
E.g, for = 3, the roots of unity have the form = .
2
4
for = 8, the roots of unity have the form = 8 = .

Recall that complex numbers can be plotted on the complex plane, we


can visualize these roots in 2D.

10
Complex Plane

Each Nth root corresponds to a ()
point on the unit circle in the
complex plane. sin()


Why unit (radius 1) circle?
= cos + sin

Modulus is always 1, since:


cos2 + sin2 = 1
from trigonometry.
11
Roots of Unity Example (N=3rd roots of unity)
By Euler formula = cos + sin ,
2
evaluating 3 for = 0 3 gives: 3

= 0 or 3: 0 = 2 = 1 +
2 1 3
= 1: 3 = + 0 = =1
2 2
4 1 3
= 2: 3 =
2 2

3
(Cubing gives a multiple of 2, giving 1.)
12
Roots of Unity Example (N=8th roots of unity)
By Euler formula = cos + sin ,

evaluating 4 for = 0 8 gives:

0 = 2 = 1 = 1
1 1 5 1 1
4 = + 4 = +
2 2 2 2
3
2
= 2 =
3 1 1 7 1 1
4 = + 4 = +
2 2 2 2

13
Discrete Fourier Transform
To be useful, operations we need are:
1. Convert input time-domain data to frequency-domain .
2. Convert frequency-domain data back to time-domain .

We derived #2; given Fourier coefficients , we have:


1

= .
=0
What about #1? How can we solve for the = ? ? ?

Use orthogonality ideas, as in the continuous case for , or

14
Another orthogonality identity
The roots of unity have the useful property:
1 1

= = ,
=0 =0
assuming (for now) that , [0, 1].

The symbol , indicates the Kronecker delta with:


0;
, =
1; =
Derivation of this identity? Stay tuned.
15
Discrete Fourier Transform
This identity will allow us to work out the reverse direction ( to ).

Will be similar to how we found the continuous Fourier series coeffs, by


relying on orthogonality identities.

Next time!

16

Вам также может понравиться