Transformada Fourier

Download as pdf or txt
Download as pdf or txt
You are on page 1of 60

Frequency domain analysis and

Fourier Transform

Compiled from:
S. Narasimhan
Njegos Nincic
Other

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).

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.

Dont believe it?


Neither did Lagrange,
Laplace, Poisson and
other big wigs
Not translated into
English until 1878!

But its true!


called Fourier Series
Possibly the greatest tool
used in Engineering

Time and Frequency


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

Time and Frequency


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

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

Frequency Spectra
Usually, frequency is more interesting than the phase

Frequency Spectra

Frequency Spectra

Frequency Spectra

Frequency Spectra

Frequency Spectra

Gibbs phenomenon:
ringing near discontinuity

sin3 0 t sin5 0 t sin7 0 t


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

3
5
7

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

Frequency Spectra

1
= A sin(2 kt )
k 1 k

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)

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

METHOD OF OBTAINING FOURIER


SERIES OF f ( x )
1. f ( x )=
2.

a0
2

1
a 0=
l

1
3. a n =
l

+
n=1

+l

f ( x ) dx
l
+l

nx
dx
f ( x ) cos l
l
l

4.

nx
nx
a n cos
+b n sin
l
l

1
nx
b n = f ( x ) sin
dx
l l
l
n= 1,2,3, . .. .

f ( x )=

a0
2

+ ( an cos nx+b n sin nx ).

(7.3)

n=1

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

1 inx inx
cos nx= ( e +e ) ,
2

f ( x )=

n=
in which

and

cn e

1 inx inx
sin nx= ( e e )
2i

inx
(7.4)

1
c n = (a n ib n ),
2
1
cn = (a n +ibn ), n> 0,
2

1
c 0 = a0 .
2

(7.6)

(7.5)

COMPLEX FORM OF FOURIER SERIES


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

f ( x )=

n=
in which

and

1
cn (an ibn ),
2
1
c n (an ibn ),
2

1
c 0 = a0 .
2

From the earlier definitions of

1
cn
T

c n e inx

n 0,

an , bn

we can show that

f ( x)e in x dx, 2 / T ,

Real and Complex Sinusoids


ejx e jx
cos x
2

ejx e jx
sin x
j2

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

20

Fourier Transform
We want to understand the frequency of our signal. So, lets
reparametrize the signal by instead of x:
Fourier
Transform

f(x)

F( )

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


of the corresponding sine

A sin( x+ )

How can F hold both? Complex number trick!

F ( )=R ( )+iI ( )

A= R () +I ()
2

F( )

Inverse Fourier
Transform

I ( )
= tan
R()
1

f(x)

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

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

Transforms
Transforms are used in mathematics to
solve differential equations:
2t
Original equation:
y'' 9y = 15e

Apply Laplace Transform:


2

s L y 9 L y =

15
L y=
2
s2s 9

Take inverse Transform: y = L(y)

15
s 2

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

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, well now look at the Fourier transform
which is a complex valued function in the frequency
domain
26

Fourier Series to Fourier Transform

27

Effect of increasing period T


0.6

a/T

0.4
0.3
0.2
0.1
0
-0.1

a/T

0.2
coefficient value, T=5

0.5

0.15
0.1
0.05
0
0

50

100

150

50

100

-0.05
-0.1

-0.2

frequency

frequency

0.12

a/T

0.1
coefficient value, T=10

coefficient value, T=2

0.25

0.08
0.06
0.04
0.02
0
-0.02

50

100

-0.04
frequency

150

150

Frequency Spectra

FT: Just a change of basis


M * f(x) = F()

.
.
.

IFT: Just a change of basis


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

.
.
.

Fourier Transform more formally


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

i 2 ux

F ( u )= f ( x ) e
Note:

dx

ik

e =cos k+isin k i= 1

Arbitrary function

Single Analytic Expression

Spatial Domain (x)

Frequency Domain (u)


(Frequency Spectrum F(u))

Inverse Fourier Transform (IFT)

i 2 ux

f ( x ) = F ( u ) e

dx

Fourier Transform
Also, defined as:

F ( u )= f ( x ) e

iux

Note:

dx

e ik =cos k+isin k i= 1

Inverse Fourier Transform (IFT)

1
iux
(
)
(
)
f x = F u e dx
2

Review of Cauchy Principal


Value Integrals
Recall for real integrals,

0 dx
2 dx
dx
0
2
I

ln x x 1 ln x x 0
1 x
1 x
0 x
2

1/x

but a finite result is obtained if the integral interpreted as


dx
I
lim
1 x
0
2

2 dx
dx

lim ln x x 1 ln x x
x
0
x

lim ln ln1 ln 2 ln ln 2
0

because the infinite contributions from the two symmetrical shaded


parts 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 dx or
2 dx
I PV

1 x
1 x

Delta function
Definition

( x )=

0 x0
x=0

( x )dx=1= ( x)dx for any > 0


( x )f ( x)dx =f (0)
Sifting property
( xx0 )f ( x )dx=f ( x0 )
Area

since

Dirac delta Function


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

x(n )=

x(k ) (nk )

k=

f (t )= f ( x )( xt )dt
36

Example 1: Decaying
Exponential

Consider the (non-periodic) signal


at

x (t )=e

u( t ) a>0

Then the Fourier transform is:

X ( j)= eat u(t )e jt dt= e (a+j)t dt


1
e(a+j)t|0
(a+j )
1
(a+j )
a=1

37

Example 2: Single Rectangular Pulse


Consider the non-periodic rectangular pulse at zero
x (t )=

1 |t|<T 1
0 |t|T 1

The Fourier transform is:

X ( j)= x(t )e jt dt = e jt dt
T
1
jt 1
e |T
j
2sin(T 1 )
1

Note, the values are real

T1 = 1

38

The Sinc Function

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

39

Example 3: Impulse Signal


The Fourier transform of the impulse signal can be calculated
as follows:

x(t )=(t )
jt
X ( j)= (t )e dt=1
Therefore, the Fourier transform of the impulse function has
a constant contribution for all frequencies

X(j)

40

Example 4: Periodic Signals


A 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.

X ( j)=2 ( 0 )
The corresponding signal can be obtained by:
1
j t
x ( t )=
2 ( 0 ) e jt d =e

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

when
0

X ( j)= 2a k (k 0 )
k=

Then the corresponding


(periodic) signal is

x(t )= ak e

jk0 t

k=

The Fourier transform of a periodic signal is a train of impulses at the


harmonic frequencies with amplitude 2ak
41

Fourier Transform Pairs (I)

Note that these are derived using


angular frequency ( eiux )

Fourier Transform Pairs (I)

Notethatthesearederivedusing
iux
angularfrequency()
e

Fourier Transform and Convolution


Let
Then

g=f h
i 2 ux

G ( u ) = g ( x ) e

dx
i2 ux

= f ( ) h ( x ) e
= [ f ( ) e

i 2 u

ddx

d ] [ h ( x ) e

i2 u ( x )

dx ]

= [ f ( ) ei 2 u d ] [ h ( x' ) ei 2 ux' dx' ]


=F ( u ) H ( u )
Convolution in spatial domain
Multiplication in frequency domain

Fourier Transform and Convolution


Spatial Domain (x)

Frequency Domain (u)

g=f h
g=fh

G=FH
G=FH

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

IFT

FT

FT

Properties of Fourier Transform


Spatial Domain (x)

Frequency Domain (u)

c 1 f ( x ) +c 2 g ( x )

c 1 F ( u ) +c 2 G ( u )

Scaling

f ( ax )

1 u
F
|a| a

Shifting

f ( xx 0 )

Symmetry

F(x)

f (u )

Conjugation

f (x)
f ( x )g ( x )

F (u )
F (u )G (u )

Linearity

Convolution

Differentiation

d f (x)
dx n

()

i2 ux 0

F (u)

( i2 u ) F ( u )
Note that these are derived using
frequency ( ei2 ux )

Properties of Fourier Transform

Example use: Hearing mechanism


Example:

Human ears do not hear wave-like


oscilations, but constant tone

Often it is easier to work in the frequency


domain

Example use: Smoothing/Blurring


We want a smoothed function of f(x)

g ( x ) =f ( x )h ( x )
Let us use a Gaussian kernel

h(x)

[ ]

1
1 x2
h ( x )=
exp 2
2
2
Then

1
2 2
H ( u ) =exp ( 2 u )
2

G ( u ) =F ( u ) H ( u )

H (u)

1
2
u

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

Image Processing in the Fourier Domain

Low-pass Filtering

Let the low frequencies pass and eliminating the high frequencies.

Generates image with overall


shading, but not much detail

High-pass Filtering

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

Exerccios

You might also like