Transcript Document

An Introduction to Fourier and
Wavelet Analysis:
Part I
Norman C. Corbett
Thursday, July-16-15
Motivation
• Search for patterns, periodicity or recurrent
features in nature
– An important element in the (stable) behaviour
of many physical systems
• Examine the long profile of rivers
– Contribute to the debate about the periodicity of
step-pool sequences
Signals
• Variety of definitions
• Real valued functions of one or more
independent variables
• Serve as mathematical models for quantities
that vary in time and/or space
• Denote a generic signal by s(t)
Signals
•
Some examples:
1. The voltage v(t) in an electrical circuit as a
function of time t
2. A black and white image I(x,y)
•
What about a colour image?
s ) of tissue along a curvilinear
3. The density rr((s)
path through a human brain
4. The long profile of a river E(d)
A Diatribe of Periodicity
• No real world signal is strictly periodic!
– Noise, friction, etc. crash the party.
• Check periodicity by constructing a phase
plane plot:  s(t ), s(t ) 
• It’s easy to make an a-periodic signal
s1 (t )  sin(3.1t )  sin(t )
s1
s2 (t )  sin( t )  sin(t )
s2
Sinusoids
•
•
The search for periodicity is the search for
the sinusoidal components of a signal
General sinusoid
s (t )  A cos(2 ft  f )
1. Amplitude A (units of observed quantity)
2. Frequency f (Hz: cycles/s) or wave number n
(1/m)
– Angular frequency w 2 f (radians/s)
3. Period T (s) or wavelength l (m)
4. Phase angle f (radians)
An Example
• What sinusoidal components do you see in
the graph of?
All real
s1
s1 (t )  sin(4 t ),
• That was easy. What about this one?
s2
world signals
contain
noise!
s2 (t )  0.5 sin(4 t )  0.5 sin(80 t )  n(t ),
• Picking out the periodic components of a
general signal is very difficult
Fourier to the Rescue!
• The continuous Fourier transform (CFT)

sˆ( f )   ei 2 ft s(t ) dt

where
e  i 2 ft  cos(2 ft )  i sin(2 ft ), i  1
• “Compare” s(t) to a family of complex
exponentials indexed by frequency f
• CFT of noisy sinusoid Fs2
Another Example
• Define s(t) by
1, 0  t  0.5
s(t )  
0, otherwise
• The CFT is
sin( f ) cos( f )  1
sˆ( f ) 

i
2 f
2 f
rectangular
pulse
Complex Numbers
•
•
sˆ( f ) is complex number.
The CFT s(t)
A complex number z     i is a point ( ,  )
in the complex plane
Im  z 
z    i
•
•
•
•
( ,  )
z
f
Re  z 
Real part 
Imaginary part 
Magnitude | z |  2   2
Argument

tan(f ) 

Spectrum
• Since the CFT is complex, we compute
1. Amplitude spectrum sˆ( f )
2
2. Spectral density (energy/power) sˆ( f )
–
•
Sometimes look at phase spectrum f ( f )
Amplitude spectrum of the rectangular
pulse
1  cos( f )
sˆ( f ) 
2 2 f 2
AS
Inverse Fourier Transform
• The original signal can be recovered via

s(t ) 
i 2 ft
e
 sˆ( f ) df

• Implies that s(t) can be expressed as a
“weighted sum” of complex exponentials
– The magnitude of the weight is the amplitude
spectrum
Computation
•
In practice we work with samples of s(t)
on a finite interval [0,T]
s(kTs ), k  0,1,
–
•
,N
Ts=T/N is the sampling period
Discrete Fourier transform (DFT)
S[l ]  k 0 s(kTs )e
k  N 1
 i 2 kl N
, l  0,1, , N  1
Computation
•
Under suitable conditions
T
sˆ(l T )  S[l ], l  0,
N
•
,N 2
We can use the DFT to estimate the CFT
at the discrete frequencies:
1 2
fl  0, , ,
T T
N
,
(Hz) est
2T
Some Real World Signals
•
Look at the spectra of river profiles in
terms of the periods (wavelength)
2T
Tl 
,
N
•
T T
, , , T (m)
3 2
Zim
Bur
A smackrel of weather data:
–
Winnipeg monthly mean temperatures for the
years Wpg
A Problem with Fourier
• Real world signals are often nonstationary
– The spectra of such signals are very complex
• Detrending ensures first order stationarity
– The mean of the residuals is zero
• Second and higher order moments may still
evolve:
– Variance, (auto)correlation, etc.
Yet Another Example
• The two signals s2 s3
• Have similar amplitude spectra Fs2 Fs3
• Remove the noise and look at the
underlying signals cs2 cs3
• The frequency of the second signal changes
– Can’t see this by looking at spectra
• Wavelets to the rescue! (TBC)
Questions?