Fourier Transforms and Frequency Domain analysis: Application to Solar Spectra (It’s very challenging for undergraduate students, but you can have a big extra credit. Note that it’s an extra credit. So it’s not required; it’s optional.) However, whatever you do in future, getting acquainted with Fourier Transformation is very useful in any field of science and engineering.
It’s an extremely powerful technique! How to Represent (any) Signal (in mathematical form)?
• 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).
Credit: S. Narasimhan Jean Baptiste Joseph Fourier (1768-1830)
• Had crazy idea (1807): • Any periodic function can be rewritten as a weighted sum of Sines (sin) and Cosines (cos) 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
Credit: S. Narasimhan A Sum of Sinusoids
• Our building block: Asin(x
• Add enough of them to get any signal f(x) you want!
• How many degrees of freedom?
• What does each control?
• Which one encodes the coarse vs. fine structure of the signal? Credit: S. Narasimhan Fourier Transform
• We want to understand the frequency of our signal. So, let’s reparametrize the signal by instead of x:
f(x) Fourier F() Transform
• For every from 0 to infinite, F() holds the amplitude A and phase of the corresponding sine Asin(x
– How can F hold both? Complex number trick! F() R() iI() I() A R()2 I()2 tan1 R()
F() Inverse Fourier f(x) Transform Credit: S. Narasimhan Time and Frequency
• example : g(t) = sin(2πf t) + (1/3)sin(2π (3f ) t)
Credit: S. Narasimhan Time and Frequency
• example : g(t) = sin(2πf t) + (1/3)sin(2π (3f ) t)
= +
Credit: S. Narasimhan Frequency Spectra
• example : g(t) = sin(2πf t) + (1/3)sin(2π(3f ) t)
= +
Credit: S. Narasimhan Fourier Transform – more formally
Represent the signal as an infinite weighted sum of an infinite number of sinusoids Fu f xei2uxdx
Note: eik 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) f x Fuei2uxdx Credit: S. Narasimhan Fourier Transform
• Also, defined as:
Fu f xeiuxdx Note: eik cos k isin k i 1
• Inverse Fourier Transform (IFT)
(Relates five most important numbers.) 1 f x Fueiuxdx 2 Fourier Transform Pairs (Examples)
Note that these are derived using angular frequency ( e iux )
Credit: S. Narasimhan Fourier Transform Pairs (Examples)
Note that these are derived using iux Credit: S. Narasimhan angular frequency ( e ) Properties of Fourier Transform
Spatial Domain (x) Frequency Domain (u)
Linearity c1 f x c2 gx c1Fu c2Gu 1 u Scaling f ax F a a
i2ux0 Shifting f x x0 e Fu
Symmetry Fx f u Conjugation f x F u Convolution f x gx FuGu
n d f x n Differentiation i2u Fu dx n Note that these are derived using frequency ( e i 2 ux ) Convolution
(Symbols of ∗ or ⊗ often used for convolution)
As a mathematical formula:
Convolutions are commutative: Fourier Transform and Convolution
Let g f h
i2ux Then Gu gxe dx “Convolution”
f hx ei2uxddx
f ei2u d hx ei2ux dx
f ei2u d hx'ei2ux'dx' FuHu
Convolution in spatial (e.g., time series) domain Multiplication in frequency domain Fourier Transform and Convolution
Spatial Domain (x) Frequency Domain (u) g f h G FH g fh G F H
So, we can find g(x) by Fourier transform g f h
IFT FT FT
G F H Convolution Examples Convolution Theorem
• The Fourier transform of a convolution is the product of the Fourier transforms
• The Fourier transform of a product is the convolution of the Fourier transforms
(Symbols of ∗ or ⊗ often used for convolution) Cross Correlation
(Note: This is convolution.)
(Pay attention to differences from convolution.) Auto Correlation
Power (density) spectrum! But the data are not continuous.
Discrete Fourier Transformation (DFT) Directional cosines
Directional cosines forms orthonormal basis for a vector. And inner vector product gives an amplitude for each direction (= each directional cosine vector). Discrete Fourier Transformation
[cos(2πijk/N) & i sin(2πijk/N)] are orthonormal basis functions of DFT. Note i is for the imaginary part of complex number and j determines frequency of each base. For
given spatial data (Xk), DTF finds an amplitude (xj) for each base (= different frequency). Think about DFT as inner product. Fast Fourier Transformation (FFT) belongs to DFT. Frequency Spectra
Credit: S. Narasimhan Discrete Fourier Transformation Discrete Fourier Transformation Discrete Fourier Transformation Can use Python functions
• Use scipy functions fft(), ifft(), and conj() • The FFT cross correlation will give you a lag curve, but because the offset is close to zero, you will see the correlation peak at either end of the curve – Hint: Try rolling the lag curve a small amount to properly see the correlation peak