Transformada Fourier

60
Compiled from: S. Narasimhan Njegos Nincic Other Frequency domain analysis and Fourier Transform

description

A transformada de Fourier

Transcript of Transformada Fourier

Page 1: Transformada Fourier

Compiled from:S. NarasimhanNjegos NincicOther

Frequency domain analysis and Fourier Transform

Page 2: Transformada Fourier

How to Represent Signals?

• Option 1: Taylor series represents any function using polynomials.

• Polynomials are not the best - unstable and not very physically meaningful.

• Easier to talk about “signals” in terms of its “frequencies”

(how fast/often signals change, etc).

Page 3: Transformada Fourier

Jean Baptiste Joseph Fourier (1768-1830)

• Had crazy idea (1807):• Any periodic function

can be rewritten as a weighted sum of Sines and Cosines of different frequencies.

• Don’t believe it? – Neither did Lagrange,

Laplace, Poisson and other big wigs

– Not translated into English until 1878!

• But it’s true!– called Fourier Series

– Possibly the greatest tool

used in Engineering

Page 4: Transformada Fourier

Time and Frequency

• example : g(t) = sin(2pi f t) + (1/3)sin(2pi (3f) t)

Page 5: Transformada Fourier

Time and Frequency

= +

• example : g(t) = sin(2pi f t) + (1/3)sin(2pi (3f) t)

Page 6: Transformada Fourier

Frequency Spectra

• example : g(t) = sin(2pi f t) + (1/3)sin(2pi (3f) t)

= +

Page 7: Transformada Fourier

Frequency Spectra

• Usually, frequency is more interesting than the phase

Page 8: Transformada Fourier

= +

=

Frequency Spectra

Page 9: Transformada Fourier

= +

=

Frequency Spectra

Page 10: Transformada Fourier

= +

=

Frequency Spectra

Page 11: Transformada Fourier

= +

=

Frequency Spectra

Page 12: Transformada Fourier

= +

=

Frequency Spectra

Page 13: Transformada Fourier

Source: http://mathworld.wolfram.com/FourierSeries.html

Gibbs phenomenon: ringing near discontinuity

f ( t )=4π (sin ω0 t+

sin3 ω0 t

3+

sin5ω0 t

5+

sin7 ω0 t

7+…)

Page 14: Transformada Fourier

= 1

1sin(2 )

k

A ktk

Frequency Spectra

Page 15: Transformada Fourier

DIRICHLET CONDITIONS

Suppose that

1.f(x) is defined and single valued except possibly at finite number of points in (-l,+l)

2.f(x) is periodic outside (-l,+l) with period 2l

3.f(x) and f’(x) are piecewise continuous in(-l,+l)

Page 16: Transformada Fourier

Then the Fourier series of f(x) converges to

a)f(x) if x is a point of continuity

b)[f(x+0)+f(x-0)]/2 if x is a point of discontinuity

Page 17: Transformada Fourier

METHOD OF OBTAINING FOURIER SERIES OF

f ( x )=1.

a0=1l∫−l

+l

f ( x )dx

an=1l∫−l

+l

f ( x )cosnπxl

dx

bn=1l∫−l

l

f ( x )sinnπxl

dx

n=1,2,3, . .. .

2.

4.

3.

f ( x )a0

2+∑

n=1

(an cosnπx

l+bn sin

nπxl )

Page 18: Transformada Fourier

Expressing cos nx and sin nx in exponential form, we may rewrite Eq.(7.1) as

f ( x )= ∑n=−∞

cn e inx(7.4)

in which

cn=12

(an−ibn ) ,

c−n=12

(an +ibn ) , n> 0,(7.5)

and c0=

12

a0 .

f ( x )=a0

2+∑

n=1

( an cosnx+bn sin nx ) .

cos nx=12

( einx +e−inx ) , sin nx=12 i

( einx−e−inx )

(7.6)

(7.3)

Page 19: Transformada Fourier

f ( x )= ∑n=−∞

cn e inx

in which 1( ),

21

( ), 0,2

n n n

n n n

c a ib

c a ib n

and c0=12

a0 .

COMPLEX FORM OF FOURIER SERIES

Recall from earlier that we can write a Fourier series in the complex form

From the earlier definitions of we can show that ,n na b

0

1( ) , 2 / ,

T in xnc f x e dx T

T

Page 20: Transformada Fourier

Real and Complex Sinusoids

cos x ejx e jx

2

sin x ejx e jx

j2

M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 20

Page 21: Transformada Fourier

Fourier Transform

• We want to understand the frequency of our signal. So, let’s reparametrize the signal by instead of x:

A sin( ωx+φ )

f(x) F()Fourier Transform

F() f(x)Inverse Fourier Transform

• For every from 0 to inf, F() holds the amplitude A and phase of the corresponding sine

– How can F hold both? Complex number trick!

F (ω )=R (ω )+iI (ω )

A=±√R (ω )2 +I (ω )2 φ= tan−1 I ( ω )

R(ω )

Page 22: Transformada Fourier

Transforms

Transform: In mathematics, a function that results when

a given function is multiplied by a so-called kernel function, and the product is integrated between suitable limits. (Britannica)

Can be thought of as a substitution

Page 23: Transformada Fourier

Transforms

Example of a substitution: Original equation: x + 4x² – 8 = 0 Familiar form: ax² + bx + c = 0 Let: y = x² Solve for y x = ±√y

4

Page 24: Transformada Fourier

Transforms

Transforms are used in mathematics to solve differential equations: Original equation: Apply Laplace Transform:

Take inverse Transform: y = Lˉ¹(y)

y'' − 9y =15e− 2t

s 2 L y − 9 L y =1 5

s 2

Ly=15

s2s2−9

Page 25: Transformada Fourier

Fourier Transform

Property of transforms: They convert a function from one domain to

another with no loss of information

Fourier Transform:

converts a function from the time (or spatial) domain to the frequency domain

Page 26: Transformada Fourier

26

Fourier Series to Fourier Transform

For periodic signals, we can represent them as linear combinations of harmonically related complex exponentials

To extend this to non-periodic signals, we need to consider aperiodic signals as periodic signals with infinite period.

As the period becomes infinite, the corresponding frequency components form a continuum and the Fourier series sum becomes an integral (like the derivation of CT convolution)

Instead of looking at the coefficients a harmonically –related Fourier series, we’ll now look at the Fourier transform which is a complex valued function in the frequency domain

Page 27: Transformada Fourier

27

Fourier Series to Fourier Transform

Page 28: Transformada Fourier

Effect of increasing period T

-0.2

-0.1

0

0.1

0.2

0.3

0.4

0.5

0.6

0 50 100 150

frequency

co

eff

icie

nt

va

lue

, T

=2

-0.1

-0.05

0

0.05

0.1

0.15

0.2

0.25

0 50 100 150

frequency

coeff

icie

nt valu

e, T=5

-0.04

-0.02

0

0.02

0.04

0.06

0.08

0.1

0.12

0 50 100 150

frequency

co

eff

icie

nt

va

lue

, T

=1

0

a/T a/T

a/T

Page 29: Transformada Fourier

Frequency Spectra

Page 30: Transformada Fourier

FT: Just a change of basis

.

.

.

* =

M * f(x) = F()

Page 31: Transformada Fourier

IFT: Just a change of basis

.

.

.

* =

M-1 * F() = f(x)

Page 32: Transformada Fourier

Fourier Transform – more formally

Arbitrary function Single Analytic Expression

Spatial Domain (x) Frequency Domain (u)

Represent the signal as an infinite weighted sum of an infinite number of sinusoids

F (u )=∫ f ( x ) e−i 2 πuxdx

(Frequency Spectrum F(u))

e ik=cos k+isin k i=√−1Note:

Inverse Fourier Transform (IFT)

f ( x )=∫ F (u ) ei 2 πuxdx

Page 33: Transformada Fourier

• Also, defined as:

F (u )=∫ f ( x ) e−iux dxe ik=cos k+isin k i=√−1Note:

• Inverse Fourier Transform (IFT)

f ( x )=1

2 π∫F (u ) e iux dx

Fourier Transform

Page 34: Transformada Fourier

Review of Cauchy Principal Review of Cauchy Principal Value IntegralsValue Integrals

2 0 2 0 2

1 01 1 0ln ln

x x

dx dx dxI x x

x x x

Recall for real integrals,

but a finite result is obtained if the integral interpreted as

2 2 2

11 10 0

0

lim lim ln ln

lim ln

x x

dx dx dxI x x

x x x

ln1 ln 2 ln ln 2

because the infinite contributions from the two symmetrical shadedparts shown exactly cancel. Integrals evaluated in this way are said to be (Cauchy) principal value integrals (or “deleted” integrals) and are often written as 2 2

1 1

dx dxI PV

x x

or

x

1/x

Page 35: Transformada Fourier

Delta function

Definition

Area for any > 0

Sifting property

since

δ ( x )={0 x≠0∞ x=0 }

∫ δ( x )dx= 1=∫ δ ( x )dx

∫ δ( x ) f ( x )dx =f (0 )

∫ δ( x−x0 ) f ( x )dx=f ( x0 )

Page 36: Transformada Fourier

36

Dirac delta Function

This allows an arbitrary sequence x(n) or continuous-time function f(t) to be expressed as:

x (n )= ∑k=−∞

x (k )δ (n−k )

f ( t )=∫ f ( x )δ( x−t )dt

Page 37: Transformada Fourier

37

Example 1: Decaying Exponential

Consider the (non-periodic) signal

Then the Fourier transform is:

x ( t )=e−at u( t ) a>0

X ( jω)=∫e−at u( t )e− jωt dt=∫e−(a+jω)t dt1−(a+jω )

e−(a+jω ) t|0∞

1(a+jω )

a = 1

Page 38: Transformada Fourier

38

Example 2: Single Rectangular Pulse

Consider the non-periodic rectangular pulse at zero

The Fourier transform is:

x ( t )={1 |t|<T 1

0 |t|≥T1}

X ( jω)=∫ x ( t )e− jωt dt =∫ e− jωt dt1− jω

e− jωt|−T 1

T1

2sin(ωT 1 )

ω

Note, the values are real

T1 = 1

Page 39: Transformada Fourier

The Sinc Function

M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 39

Page 40: Transformada Fourier

40

Example 3: Impulse SignalThe Fourier transform of the impulse signal can be calculated

as follows:

Therefore, the Fourier transform of the impulse function has a constant contribution for all frequencies

x ( t )=δ ( t )

X ( jω)=∫ δ ( t )e− jωt dt=1

X(j)

Page 41: Transformada Fourier

41

Example 4: Periodic SignalsA periodic signal violates condition 1 of the Dirichlet conditions for the

Fourier transform to exist

However, lets consider a Fourier transform which is a single impulse of area 2 at a particular (harmonic) frequency =0.

The corresponding signal can be obtained by:

which is a (complex) sinusoidal signal of frequency 0. More generally, when

Then the corresponding (periodic) signal is

The Fourier transform of a periodic signal is a train of impulses at the harmonic frequencies with amplitude 2ak

x ( t )=1

2 π∫2 πδ ( ω−ω0 )e jωt dω=e

jω0 t

X ( jω)=2 πδ (ω−ω0 )

X ( jω)= ∑k=−∞

2 πak δ (ω−kω0 )

x ( t )= ∑k=−∞

ak ejkω0 t

Page 42: Transformada Fourier

Fourier Transform Pairs (I)

angular frequency ( )e−iuxNote that these are derived using

Page 43: Transformada Fourier

angular frequency (          )e−iuxNote that these are derived using

Fourier Transform Pairs (I)

Page 44: Transformada Fourier

Fourier Transform and Convolution

g=f∗h

G (u )=∫ g ( x ) e−i 2 πuxdx

=∫∫ f ( τ )h ( x−τ ) e−i2 πux dτdx

=∫∫ [ f ( τ ) e−i 2 πuτ dτ ] [h ( x−τ ) e−i2 πu ( x−τ ) dx ]

=∫ [ f ( τ ) e−i 2 πuτ dτ ]∫ [h ( x' ) e−i 2 πux' dx' ]

Let

Then

=F (u ) H (u )

Convolution in spatial domain

Multiplication in frequency domain⇔

Page 45: Transformada Fourier

Fourier Transform and Convolution

g=f∗h G=FH

g=fh G=F∗H

Spatial Domain (x) Frequency Domain (u)

So, we can find g(x) by Fourier transform

g = f h

G = F H

FT FTIFT

Page 46: Transformada Fourier

Properties of Fourier Transform

Spatial Domain (x) Frequency Domain (u)

Linearity c1 f ( x ) +c2 g ( x ) c1 F (u )+c2 G (u )

Scaling f ( ax )1|a|

F ( ua )

Shifting f ( x−x0 ) e−i2 πux0 F (u )

Symmetry F ( x ) f (−u )

Conjugation f ( x ) F (−u )Convolution f ( x )∗g ( x ) F (u )G (u )

Differentiationdn f ( x )

dxn (i2 πu )n F (u )

frequency ( )e−i2 πuxNote that these are derived using

Page 47: Transformada Fourier

Properties of Fourier Transform

Page 48: Transformada Fourier
Page 49: Transformada Fourier
Page 50: Transformada Fourier
Page 51: Transformada Fourier
Page 52: Transformada Fourier
Page 53: Transformada Fourier
Page 54: Transformada Fourier
Page 55: Transformada Fourier

Example: Human ears do not hear wave-like

oscilations, but constant tone

Often it is easier to work in the frequency domain

Example use: Hearing mechanism

Page 56: Transformada Fourier

Example use: Smoothing/Blurring

• We want a smoothed function of f(x)

g ( x )=f ( x )∗h ( x )

H(u) attenuates high frequencies in F(u) (Low-pass Filter)!

• Then

H (u )=exp [−12

(2 πu )2 σ2 ]G (u ) =F (u ) H (u )

12πσ

u

H (u )

h ( x )=1

√2 π σexp[−1

2x2

σ 2 ]• Let us use a Gaussian kernel

σ

h ( x )

x

Page 57: Transformada Fourier

Image Processing in the Fourier Domain

Page 58: Transformada Fourier

Low-pass Filtering

Let the low frequencies pass and eliminating the high frequencies.

Generates image with overall shading, but not much detail

Page 59: Transformada Fourier

High-pass Filtering

Lets through the high frequencies (the detail), but eliminates the low frequencies (the overall shape). It acts like an edge enhancer.

Page 60: Transformada Fourier

Exercícios