Processes Notes on Discrete Fourier Transforms- Sandra Chapman (MPAGS: Time series...

advertisement
Notes on Discrete Fourier Transforms- Sandra Chapman (MPAGS: Time series analysis)
Processes
waves (nonlinear)
wave – wave interactions
(coupled oscillators)
Time-stationary
Turbulence, SOC, DLA,
coupled maps, critical
phenomena, random
walks (SDE)
high
low
dimensional
dimensional
transients
order – disorder transition
intermittency "in a box"
self organisation
Non-time stationary
Techniques
Time stationary
Structure functions
and wavelets
Fourier
low
Wavelets
SVD
complexity
measures
dimensional
Non-time stationary
1
high
dimensional
Notes on Discrete Fourier Transforms- Sandra Chapman (MPAGS: Time series analysis)
Summary of Fourier transforms and DFT
Time series x t , its transform S  f  , time interval T

a)
expand x t in an orthogonal set of basis functions


x t 
S m e2ifm t ,
m

and
1
Sm 
T

NB:
orthogonality
T /2
T / 2



fm 
m
T
x t e2ifm t dt
einm x dx  2mn
we will discuss the importance of this in a moment…
b)
Parseval's theorem
T /2

T / 2
x t
2
dt  T

Sm
2
m
S  S m eim - in general complex
 m
2
2
amplitude spectrum S m, S m  S m S m* phase spectrum m ; (discrete) power spectrum S m 

the power in mode f m .
c)
Defns: since
d)
We then take the continuous limit f N  f , T   to obtain the Fourier transform pair:

x t 

S f e2ift df


S f  x t e2ift dt


NB: Notation – choosing variables f and t retains symmetry. If we worked in terms of
1
  2 f
in eit term this results in a factor
in front of the IFT.
2

e)
Parseval becomes:


x t
2
dt 

S f

2
2
df .
Notes on Discrete Fourier Transforms- Sandra Chapman (MPAGS: Time series analysis)
f)
Defns:

S f
S f 
amplitude spectrum
2
power spectral density
ie S  f  df is the power in band f  f  df
again, S is complex
S  f   A  f  ei f 
2
amp. spectrum
phase spectrum
One can construct surrogate data sets by modifying (randomising)   f  .
Some important theorems:
g)
Convolution

Defn: convolution g t * h t  g  h t   d



then
h)
FT g t * h t e2ift dt  G f .H f
 
product of FT of g and h
(convolution theorem)
Cross correlation

Defn: cross correlation g t  h t  g   h t   d


not the same as convolution. However:

FT

NB:
i)

g t  h t e2ift dt  G  f .H f
g  - complex conjugate
Auto correlation – put h  g  x

x t  x t  x  x t   d  R t


then


 x t  x t  e2ift dt  S  f S f  S f


3
2
Notes on Discrete Fourier Transforms- Sandra Chapman (MPAGS: Time series analysis)

or R t  S 2 f e2ift df


Wiener-Khintchine theorem
[Will relate to "statistical correlation" and covariance in a moment.]
j)
Uncertainty principle/resolution
Consider a well known example (diffraction)
x  t  is a "top hat" function
1
-a
a
S  f  is a sinc function
1/2a
-1/2a
S f 

proof:


sin 2af
f
a
2ift
e
a
dt 
 e2ift  e2iaf  e2iaf




2if
2if
a 
a
1st zero at 2af   or
f  1 / 2a
thus, "width" of function has the property tf ~ 1 .
Finite window in t thus implies spectral leakage in f – to come later.
4
cf diffraction at
slits in optics
Notes on Discrete Fourier Transforms- Sandra Chapman (MPAGS: Time series analysis)
k)
Finally….(an aside)
A relationship with the moments of a function
(relates to cumulants)

Since
S f  x t e2ift dt



dS

2it x t e2ift dt
df



so,
and
dS
f  0  2i tx t dt
df



1
dP
S f  0  t P x t dt  mp
P
P
df
2i


the pth moment of x  t 
hence, if x  t  is PDF then S  f  is the characteristic function – useful in handing PDFs.
5
Notes on Discrete Fourier Transforms- Sandra Chapman (MPAGS: Time series analysis)
Discrete Fourier Theory
What you actually calculate for real time series
a)
x  t  is sampled every t over interval T
x t  xk

k  0, 1...N 1 t  kt
Discrete Fourier Transform (DFT) are
1 N 1
xk 
S m e2imk / N
Nt m0
N 1
S m  t xk e2ikm/ N
k 0

NB: usually t  1 - given explicitly here to be clear about units, normalisation.
b)
Now Sm is associated with frequency (mode) f m 
and xk is associated with time tk  k t .
Thus "resolution”
t
f 
corresponds to
f t ~ 1 / N .
c)
m
N t
1
, "uncertainty principle" becomes
N t
Cyclic behaviour
Note, indices can be written as
k  k  p
or sums over
m m p
k  p...N  p  1
m  p...N  p  1
This implies periodicity over N, that is periodicity in time over T.
General implications of the DFT pair - I
(which also hold for continuous limit – not done here).
Write the DFT pair again:
1
xk 
T

N 1
S m e2ifm tk
m0
- this is just an expansion of x  t  in an orthogonal basis e 2 ifmtk , but the series is truncated at
m  N  1 , ie, summing over finite number of modes fm.
6
Notes on Discrete Fourier Transforms- Sandra Chapman (MPAGS: Time series analysis)
- this expresses the fact that x  t  is represented by a linear superposition of a finite set of modes - a
linear process.
General implications – II – co-ordinate rotations
Write
Amk  e 2 imk / N
*
Amk
 e2 imk / N

A
a matrix
complex conjugate
complex conjugate transpose
since A is symmetric
Setting normalizations 1 / N ,t  1 etc for now;
Then
a rotation/projection
xk  Akm S m
The DFT simply projects the vector xk into a (useful) co-ordinate system to give vector S m .
Amk is a rotation matrix.
1
Follows that Sm  Amk
xk - inverse rotation.
We can treat all transforms in this way.
Desirable property – from the DFT – defn. we have the following:
mk xk  A
mk  Akp S p  - from DFT
Sm  A
thus
mk Akp  mp
A
- A is orthogonal
 so inverse FT exists.
Alternatively, if A is a rotation
1
S m  Amk
xk
1
 Amk
 Akp S p 
d)

so A1  A
- A is orthogonal
Orthogonality of the DFT
For the Fourier transform:
Amk  e 2 imk / N
 
Amp A
qp
N 1
e2imp / N e2iqp / N
p0
so


N 1
e2ipmq / N  mq
p0
7
Notes on Discrete Fourier Transforms- Sandra Chapman (MPAGS: Time series analysis)
The discrete version of the orthogonality condition seen earlier
e)
Parseval's theorem
- follows from orthogonality.
Consider inner product
xk xk   Akp S p  Akq Sq 
qk S q since A
  A*T
  Akp S p  A
qk Akp S p S q
A
  pq S p S q  S p S p
ie:
N 1
k 0
xk2 
N 1
S p2
p0
or putting back normalisation!
t

N 1
k 0
xk
2

1 N 1
S
Nt k 0 k
2
ie: Parseval's theorem states that the length of the vector xk is unchanged under rotation  to
the Sm .
 will hold for any transform that is orthogonal.
f)
Convolution – of time series g k , hk
N 1
g k * hk  t gu hku
u0

and DFT gives convolution theorem:
N 1
t
g k * hk e2ikm/ N  Gm H m
 k 0
N 1
Gm  t g k e2ikm/ N - same for H m
k 0

where
again, this is cyclic – write k  k  p
sum is over p...N  p  1 .
NB: notation – often refer to "lag" 

gh

 t
N 1
k0
g k hk and   t .
8
Notes on Discrete Fourier Transforms- Sandra Chapman (MPAGS: Time series analysis)
g)
Cross correlation
C 

N 1
g k hk 
k 0
and again we have


h)
N 1
 0
 Gm* H m
C e2im / N
(note   t here).
Auto correlation
and
R 

N 1
k 0
xk xk 
S Sm  Sm

*
m
-
2
 
N 1
 0
R e2im / N
Wiener-Khintchine.
NB: Normalisation – often normalised to the "zero lag" (   0 term).
R 

N 1
k 0
xk xk  
N 1
k 0
xk xk
Statistical correlation and covariance
Other things are called "correlation", ie: correlation coeff:
N
Qxy 
xi  x yi  y
i

this is just the   0 value C0 of the cross correlation for an iid zero mean process
ie:
covariance
Qxx  R0
Qxy 

N
i
xi  x
yi  y
N
since the correlation (statistical) is often normalised to xi2 and yi2 we have
Qxy
 Qxy
 x y
where  x  x 2  x
9
2
Download