DIP 04 FourierTransform Part1
DIP 04 FourierTransform Part1
2021/1
Agenda
1 Fundamental concepts
Representation of functions using points and coefficients
Fourier Series and the complex exponential
2 Fourier Transform
Motivation, algorithm, examples
Introduction
⇔ (-22.00257, -47.89855) ⇔
Av.Trabalhador
Saocarlense, 400
⇔ (-22.00257, -47.89855) ⇔
Av.Trabalhador
Saocarlense, 400
⇔ (-22.00257, -47.89855) ⇔
Introduction
Introduction
Introduction
Agenda
1 Fundamental concepts
Representation of functions using points and coefficients
Fourier Series and the complex exponential
2 Fourier Transform
Motivation, algorithm, examples
Representations of a function
Given n = 10 unique
points:
x f(x)
-1.0 , 4.0
-0.79 , 4.04
-0.58 , 4.18
-0.37 , 4.4
-0.16 , 4.71
0.05 , 5.1
0.26 , 5.59
0.47 , 6.16
0.68 , 6.82
Can I represent it using a different set of values?
0.89 , 7.57
Representations of a function
Representations of a function
Representations of a function
Representations of a function
x1N−1 . . . 1
N
x1 f (x1 )
x N
2 x2N−1 . . . 1 Y = f (x2 )
A= . . . ...
xnN xnN−1 . . . 1 f (xn )
Representations of a function
In our example
1.0 −1.0 1.0 4.0
0.62
−0.79 1.0
4.04
0.34
−0.58 1.0
4.18
0.14
−0.37 1.0
4.4
0.03 −0.16 1.0 Y = 4.71
A=
0.0
0.05 1.0
5.1
0.07 0.26 1.0 5.59
0.22 0.47 1.0 6.16
0.46 0.68 1.0 6.82
0.79 0.89 1.0 7.57
1.0
C = 2.0
5.0
Moacir Ponti (ICMC–USP) Fourier Transform 2021/1 12 / 50
Fundamental concepts Representation of functions using points and coefficients
Representations of a function
Representations
Agenda
1 Fundamental concepts
Representation of functions using points and coefficients
Fourier Series and the complex exponential
2 Fourier Transform
Motivation, algorithm, examples
Fourier Series
Periodicity
Time: harmonic movement (e.g. of a string)
Space: some physical measure distributed to a certain region in a
symmetric way (periodicity from symmetry, repetition of a pattern).
Periodicity
Time: harmonic movement (e.g. of a string)
Space: some physical measure distributed to a certain region in a
symmetric way (periodicity from symmetry, repetition of a pattern).
e.g. heat distribution in a circular object: the temperature repeat itself
in cycles.
Periodicity
Time: harmonic movement (e.g. of a string)
Space: some physical measure distributed to a certain region in a
symmetric way (periodicity from symmetry, repetition of a pattern).
e.g. heat distribution in a circular object: the temperature repeat itself
in cycles.
that is why Fourier Analysis is often associated with symmetry.
In some cases time and space are involved at the same time — e.g.
wave movement
If we fix the position (in space), we can measure frequency
(distribution of the pattern in time)
By fixing an instant (in time) we can measure the size (distribution of
the pattern in space).
Wavelength vs Frequency
Fourier Series
There are mathematical functions for which
f (t + T ) =f (t) (1)
f (t + nT ) =f (t), n = 0, ±1, ±2, · · · (2)
(3)
some can be used to model periodic behaviour, in particular sinusoids
Fourier Series
There are mathematical functions for which
f (t + T ) =f (t) (1)
f (t + nT ) =f (t), n = 0, ±1, ±2, · · · (2)
(3)
some can be used to model periodic behaviour, in particular sinusoids
Why not others: square wave, other periodic signals?
Fourier Series
There are mathematical functions for which
f (t + T ) =f (t) (1)
f (t + nT ) =f (t), n = 0, ±1, ±2, · · · (2)
(3)
some can be used to model periodic behaviour, in particular sinusoids
Why not others: square wave, other periodic signals?
Fourier Series
Fourier Series
Fourier Series
Important remarks:
Functions with the simplest periodic behaviour: sines and cosines;
Important remarks:
Functions with the simplest periodic behaviour: sines and cosines;
circle: cos t is coordinate x and sin t is coordinate y of a unitary circle.
Fourier Series
c = R + jI , (7)
√
R and I are real numbers and j is the imaginary j = −1
Geometric interpretation: a complex Cartesian plane with real axis R,
and imaginary axis I .
Euler’s formula relates the complex sum of sine and cosine using a
complex exponential:
and obtain
c = |c|e jω . (11)
Euler’s formula relates the complex sum of sine and cosine using a
complex exponential:
and obtain
c = |c|e jω . (11)
Example: x = 1 + j2
√
in polar coordinates: 5e jω , with ω = 64, 4
[Complex Exponential]
e jx cos x sin x
Thanks to Jim Clay
Agenda
1 Fundamental concepts
Representation of functions using points and coefficients
Fourier Series and the complex exponential
2 Fourier Transform
Motivation, algorithm, examples
Fourier Transform
Fourier Transform
Fourier Transform
Fourier Transform
Fourier Transform
Fourier Transform
Fourier Transform
When plotting the function in the Fourier domain, we use, for each
frequency a complex exponential with:
Fourier Transform
When plotting the function in the Fourier domain, we use, for each
frequency a complex exponential with:
the relative amplitude of the cosine (real part) and of the sine
(imaginary part) as a function of ω,
the representation of the signal in the frequency domain:
an (ω) = Re(F (ω))
bn (ω) = Im(F (ω))
N−1
X
F (ω) = f (t)e −jωt
t=0
Motivation
Motivation
Information in Frequency
n−1
X
F (ω) = f (t)e −jωt dt
t=0
1: for i = 0 to n − 1 do
2: multiply: f (t) × e −jωi t ,
5: end for
n−1
X
F (ω) = f (t)e −jωt dt
t=0
1: for i = 0 to n − 1 do
2: multiply: f (t) × e −jωi t , or f (t) × [cos(ωi t) + j sin(ωi t)].
5: end for
n−1
X n−1
X n−1
X
−jωt
F (ω) = f (t)e dt = f (t) cos(ωt)dt + f (t)j sin(ωt)dt
t=0 t=0 t=0
1: for i = 0 to n − 1 do
2: multiply: f (t) × e −jωi t , or f (t) × [cos(ωi t) + j sin(ωi t)].
5: end for
n−1
X n−1
X n−1
X
−jωt
F (ω) = f (t)e dt = f (t) cos(ωt)dt + f (t)j sin(ωt)dt
t=0 t=0 t=0
1: for i = 0 to n − 1 do
2: multiply: f (t) × e −jωi t , or f (t) × [cos(ωi t) + j sin(ωi t)].
3: sum (integrate) for all t getting coefficients a (real) / b (imag)
5: end for
n−1
X n−1
X n−1
X
−jωt
F (ω) = f (t)e dt = f (t) cos(ωt)dt + f (t)j sin(ωt)dt
t=0 t=0 t=0
1: for i = 0 to n − 1 do
2: multiply: f (t) × e −jωi t , or f (t) × [cos(ωi t) + j sin(ωi t)].
3: sum (integrate) for all t getting coefficients a (real) / b (imag)
4: F (ωi ) = aωi + jbωi
5: end for
Frequency analysis
Signal obtained by summing a sine with amplitude 0.6 and frequency 3Hz
and a cosine with amplitude 0.8 frequency 8Hz:
f = 0.6*sin((2*pi) * 3 * t) + 0.8*cos((2*pi) * 8 * t)
After multiply using 3Hz cosine the sum is near zero, since this component
is not part of the signal (see positive and negatives cancel each other)
On the other hand, for a 3Hz sine, most values are positive because this
wave is part of the signal.
Frequency analysis
# reescaled/normalised spectrum
yw = ( 2.0/N*np.abs(yf(:N2)) )
Moacir Ponti (ICMC–USP) Fourier Transform 2021/1 47 / 50
Fourier Transform Motivation, algorithm, examples
Applications