Introduction to Fourier transform and signal analysis
1. Continuous Fourier transform
Discrete Fourier transform
References
Introduction to Fourier transform and signal
analysis
Zong-han, Xie
icbm0926@gmail.com
January 7, 2015
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
2. Continuous Fourier transform
Discrete Fourier transform
References
License of this document
Introduction to Fourier transform and signal analysis by Zong-han,
Xie (icbm0926@gmail.com) is licensed under a Creative Commons
Attribution-NonCommercial 4.0 International License.
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
3. Continuous Fourier transform
Discrete Fourier transform
References
Outline
1 Continuous Fourier transform
2 Discrete Fourier transform
3 References
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
4. Continuous Fourier transform
Discrete Fourier transform
References
Orthogonal condition
Any two vectors a, b satisfying following condition are
mutually orthogonal.
a∗
· b = 0 (1)
Any two functions a(x), b(x) satisfying the following
condition are mutually orthogonal.
a∗
(x) · b(x)dx = 0 (2)
* means complex conjugate.
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
5. Continuous Fourier transform
Discrete Fourier transform
References
Complete and orthogonal basis
cos nx and sin mx are mutually orthogonal in which n and m
are integers.
π
−π
cos nx · sin mxdx = 0
π
−π
cos nx · cos mxdx = πδnm
π
−π
sin nx · sin mxdx = πδnm (3)
δnm is Dirac-delta symbol. It means δnn = 1 and δnm = 0
when n = m.
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
6. Continuous Fourier transform
Discrete Fourier transform
References
Fourier series
Since cos nx and sin mx are mutually orthogonal, we can expand
an arbitrary periodic function f (x) by them. we shall have a series
expansion of f (x) which has 2π period.
f (x) = a0 +
∞
k=1
(ak cos kx + bk sin kx)
a0 =
1
2π
π
−π
f (x)dx
ak =
1
π
π
−π
f (x) cos kxdx
bk =
1
π
π
−π
f (x) sin kxdx (4)
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
7. Continuous Fourier transform
Discrete Fourier transform
References
Fourier series
If f (x) has L period instead of 2π, x is replaced with πx/L.
f (x) = a0 +
∞
k=1
ak cos
2kπx
L
+ bk sin
2kπx
L
a0 =
1
L
L
2
− L
2
f (x)dx
ak =
2
L
L
2
− L
2
f (x) cos
2kπx
L
dx, k = 1, 2, ...
bk =
2
L
L
2
− L
2
f (x) sin
2kπx
L
dx, k = 1, 2, ... (5)
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
8. Continuous Fourier transform
Discrete Fourier transform
References
Fourier series of step function
f (x) is a periodic function with 2π period and it’s defined as
follows.
f (x) = 0, −π < x < 0
f (x) = h, 0 < x < π (6)
Fourier series expansion of f (x) is
f (x) =
h
2
+
2h
π
sin x
1
+
sin 3x
3
+
sin 5x
5
+ ... (7)
f (x) is piecewise continuous within the periodic region. Fourier
series of f (x) converges at speed of 1/n.
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
9. Continuous Fourier transform
Discrete Fourier transform
References
Fourier series of step function
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
10. Continuous Fourier transform
Discrete Fourier transform
References
Fourier series of triangular function
f (x) is a periodic function with 2π period and it’s defined as
follows.
f (x) = −x, −π < x < 0
f (x) = x, 0 < x < π (8)
Fourier series expansion of f (x) is
f (x) =
π
2
−
4
π
n=1,3,5...
cos nx
n2
(9)
f (x) is continuous and its derivative is piecewise continuous within
the periodic region. Fourier series of f (x) converges at speed of
1/n2.
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
11. Continuous Fourier transform
Discrete Fourier transform
References
Fourier series of triangular function
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
12. Continuous Fourier transform
Discrete Fourier transform
References
Fourier series of full wave rectifier
f (t) is a periodic function with 2π period and it’s defined as
follows.
f (t) = − sin ωt, −π < t < 0
f (t) = sin ωt, 0 < t < π (10)
Fourier series expansion of f (x) is
f (t) =
2
π
−
4
π
n=2,4,6...
cos nωt
n2 − 1
(11)
f (x) is continuous and its derivative is piecewise continuous within
the periodic region. Fourier series of f (x) converges at speed of
1/n2.
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
13. Continuous Fourier transform
Discrete Fourier transform
References
Fourier series of full wave rectifier
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
14. Continuous Fourier transform
Discrete Fourier transform
References
Complex Fourier series
Using Euler’s formula, Eq. 4 becomes
f (x) = a0 +
∞
k=1
ak − ibk
2
eikx
+
ak + ibk
2
e−ikx
Let c0 ≡ a0, ck ≡ ak −ibk
2 and c−k ≡ ak +ibk
2 , we have
f (x) =
∞
m=−∞
cmeimx
cm =
1
2π
π
−π
f (x)e−imx
dx (12)
eimx and einx are also mutually orthogonal provided n = m and it
forms a complete set. Therfore, it can be used as orthogonal basis.
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
15. Continuous Fourier transform
Discrete Fourier transform
References
Complex Fourier series
If f (x) has T period instead of 2π, x is replaced with 2πx/T.
f (x) =
∞
m=−∞
cmei 2πmx
T
cm =
1
T
T
2
−T
2
f (x)e−i 2πmx
T dx, m = 0, 1, 2... (13)
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
16. Continuous Fourier transform
Discrete Fourier transform
References
Fourier transform
from Eq. 13, we define variables k ≡ 2πm
T , ˆf (k) ≡ cmT√
2π
and
k ≡ 2π(m+1)
T − 2πm
T = 2π
T .
We can have
f (x) =
1
√
2π
∞
m=−∞
ˆf (k)eikx
k
ˆf (k) =
1
√
2π
T
2
−T
2
f (x)e−ikx
dx
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
17. Continuous Fourier transform
Discrete Fourier transform
References
Fourier transform
Let T −→ ∞
f (x) =
1
√
2π
∞
−∞
ˆf (k)eikx
dk (14)
ˆf (k) =
1
√
2π
∞
−∞
f (x)e−ikx
dx (15)
Eq.15 is the Fourier transform of f (x) and Eq.14 is the inverse
Fourier transform of ˆf (k).
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
18. Continuous Fourier transform
Discrete Fourier transform
References
Properties of Fourier transform
f (x), g(x) and h(x) are functions and their Fourier transforms are
ˆf (k), ˆg(k) and ˆh(k). a, b x0 and k0 are real numbers.
Linearity: If h(x) = af (x) + bg(x), then Fourier transform of
h(x) equals to ˆh(k) = aˆf (k) + bˆg(k).
Translation: If h(x) = f (x − x0), then ˆh(k) = ˆf (k)e−ikx0
Modulation: If h(x) = eik0x f (x), then ˆh(k) = ˆf (k − k0)
Scaling: If h(x) = f (ax), then ˆh(k) = 1
a
ˆf (k
a )
Conjugation: If h(x) = f ∗(x), then ˆh(k) = ˆf ∗(−k). With this
property, one can know that if f (x) is real and then
ˆf ∗(−k) = ˆf (k). One can also find that if f (x) is real and then
|ˆf (k)| = |ˆf (−k)|.
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
19. Continuous Fourier transform
Discrete Fourier transform
References
Properties of Fourier transform
If f (x) is even, then ˆf (−k) = ˆf (k).
If f (x) is odd, then ˆf (−k) = −ˆf (k).
If f (x) is real and even, then ˆf (k) is real and even.
If f (x) is real and odd, then ˆf (k) is imaginary and odd.
If f (x) is imaginary and even, then ˆf (k) is imaginary and even.
If f (x) is imaginary and odd, then ˆf (k) is real and odd.
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
20. Continuous Fourier transform
Discrete Fourier transform
References
Dirac delta function
Dirac delta function is a generalized function defined as the
following equation.
f (0) =
∞
−∞
f (x)δ(x)dx
∞
−∞
δ(x)dx = 1 (16)
The Dirac delta function can be loosely thought as a function
which equals to infinite at x = 0 and to zero else where.
δ(x) =
+∞, x = 0
0, x = 0
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
21. Continuous Fourier transform
Discrete Fourier transform
References
Dirac delta function
From Eq.15 and Eq.14
ˆf (k) =
1
2π
∞
−∞
∞
−∞
ˆf (k )eik x
dk e−ikx
dx
=
1
2π
∞
−∞
∞
−∞
ˆf (k )ei(k −k)x
dxdk
Comparing to ”Dirac delta function”, we have
ˆf (k) =
∞
−∞
ˆf (k )δ(k − k)dk
δ(k − k) =
1
2π
∞
−∞
ei(k −k)x
dx (17)
Eq.17 doesn’t converge by itself, it is only well defined as part of
an integrand.
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
22. Continuous Fourier transform
Discrete Fourier transform
References
Convolution theory
Considering two functions f (x) and g(x) with their Fourier
transform F(k) and G(k). We define an operation
f ∗ g =
∞
−∞
g(y)f (x − y)dy (18)
as the convolution of the two functions f (x) and g(x) over the
interval {−∞ ∼ ∞}. It satisfies the following relation:
f ∗ g =
∞
−∞
F(k)G(k)eikx
dt (19)
Let h(x) be f ∗ g and ˆh(k) be the Fourier transform of h(x), we
have
ˆh(k) =
√
2πF(k)G(k) (20)
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
23. Continuous Fourier transform
Discrete Fourier transform
References
Parseval relation
∞
−∞
f (x)g(x)∗
dx =
∞
−∞
1
√
2π
∞
−∞
F(k)eikx
dk
1
√
2π
∞
−∞
G∗
(k )e−ik x
dk dx
=
∞
−∞
1
2π
∞
−∞
F(k)G∗
(k )ei(k−k )x
dkdk
By using Eq. 17, we have the Parseval’s relation.
∞
−∞
f (x)g∗
(x)dx =
∞
−∞
F(k)G∗
(k)dk (21)
Calculating inner product of two fuctions gets same result as the
inner product of their Fourier transform.
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
24. Continuous Fourier transform
Discrete Fourier transform
References
Cross-correlation
Considering two functions f (x) and g(x) with their Fourier
transform F(k) and G(k). We define cross-correlation as
(f g)(x) =
∞
−∞
f ∗
(x + y)g(x)dy (22)
as the cross-correlation of the two functions f (x) and g(x) over
the interval {−∞ ∼ ∞}. It satisfies the following relation: Let
h(x) be f g and ˆh(k) be the Fourier transform of h(x), we have
ˆh(k) =
√
2πF∗
(k)G(k) (23)
Autocorrelation is the cross-correlation of the signal with itself.
(f f )(x) =
∞
−∞
f ∗
(x + y)f (x)dy (24)
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
25. Continuous Fourier transform
Discrete Fourier transform
References
Uncertainty principle
One important properties of Fourier transform is the uncertainty
principle. It states that the more concentrated f (x) is, the more
spread its Fourier transform ˆf (k) is.
Without loss of generality, we consider f (x) as a normalized
function which means
∞
−∞ |f (x)|2dx = 1, we have uncertainty
relation:
∞
−∞
(x − x0)2
|f (x)|2
dx
∞
−∞
(k − k0)2
|ˆf (k)|2
dk
1
16π2
(25)
for any x0 and k0 ∈ R. [3]
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
26. Continuous Fourier transform
Discrete Fourier transform
References
Fourier transform of a Gaussian pulse
f (x) = f0e
−x2
2σ2 eik0x
ˆf (k) =
1
√
2π
∞
−∞
f (x)e−ikx
dx
=
f0
1/σ2
e
−(k0−k)2
2/σ2
|ˆf (k)|2
∝ e
−(k0−k)2
1/σ2
Wider the f (x) spread, the more concentrated ˆf (k) is.
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
27. Continuous Fourier transform
Discrete Fourier transform
References
Fourier transform of a Gaussian pulse
Signals with different width.
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
28. Continuous Fourier transform
Discrete Fourier transform
References
Fourier transform of a Gaussian pulse
The bandwidth of the signals are different as well.
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
29. Continuous Fourier transform
Discrete Fourier transform
References
Outline
1 Continuous Fourier transform
2 Discrete Fourier transform
3 References
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
30. Continuous Fourier transform
Discrete Fourier transform
References
Nyquist critical frequency
Critical sampling of a sine wave is two sample points per cycle.
This leads to Nyquist critical frequency fc.
fc =
1
2∆
(26)
In above equation, ∆ is the sampling interval.
Sampling theorem: If a continuos signal h(t) sampled with interval
∆ happens to be bandwidth limited to frequencies smaller than fc.
h(t) is completely determined by its samples hn. In fact, h(t) is
given by
h(t) = ∆
∞
n=−∞
hn
sin[2πfc(t − n∆)]
π(t − n∆)
(27)
It’s known as Whittaker - Shannon interpolation formula.
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
31. Continuous Fourier transform
Discrete Fourier transform
References
Discrete Fourier transform
Signal h(t) is sampled with N consecutive values and sampling
interval ∆. We have hk ≡ h(tk) and tk ≡ k ∗ ∆,
k = 0, 1, 2, ..., N − 1.
With N discrete input, we evidently can only output independent
values no more than N. Therefore, we seek for frequencies with
values
fn ≡
n
N∆
, n = −
N
2
, ...,
N
2
(28)
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
32. Continuous Fourier transform
Discrete Fourier transform
References
Discrete Fourier transform
Fourier transform of Signal h(t) is H(f ). We have discrete Fourier
transform Hn.
H(fn) =
∞
−∞
h(t)e−i2πfnt
dt ≈ ∆
N−1
k=0
hke−i2πfntk
= ∆
N−1
k=0
hke−i2πkn/N
Hn ≡
N−1
k=0
hke−i2πkn/N
(29)
Inverse Fourier transform is
hk ≡
1
N
N−1
n=0
Hnei2πkn/N
(30)
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
33. Continuous Fourier transform
Discrete Fourier transform
References
Periodicity of discrete Fourier transform
From Eq.29, if we substitute n with n + N, we have Hn = Hn+N.
Therefore, discrete Fourier transform has periodicity of N.
Hn+N =
N−1
k=0
hke−i2πk(n+N)/N
=
N−1
k=0
hke−i2πk(n)/N
e−i2πkN/N
= Hn (31)
Critical frequency fc corresponds to 1
2∆ .
We can see that discrete Fourier transform has fs period where
fs = 1/∆ = 2 ∗ fc is the sampling frequency.
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
34. Continuous Fourier transform
Discrete Fourier transform
References
Aliasing
If we have a signal with its bandlimit larger than fc, we have
following spectrum due to periodicity of DFT.
Aliased frequency is f − N ∗ fs where N is an integer.
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
35. Continuous Fourier transform
Discrete Fourier transform
References
Aliasing example: original signal
Let’s say we have a sinusoidal sig-
nal of frequency 0.05. The sampling interval is 1. We have the signal
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
36. Continuous Fourier transform
Discrete Fourier transform
References
Aliasing example: spectrum of original signal
and we have its spectrum
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
37. Continuous Fourier transform
Discrete Fourier transform
References
Aliasing example: critical sampling of original signal
The critical sampling interval of the original signal is 10 which is
half of the signal period.
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
38. Continuous Fourier transform
Discrete Fourier transform
References
Aliasing example: under sampling of original signal
If we sampled the original sinusiodal signal with period 12, aliasing
happens.
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
39. Continuous Fourier transform
Discrete Fourier transform
References
Aliasing example: DFT of under sampled signal
fc of downsampled signal is 1
2∗12, aliased frequency is
f − 2 ∗ fc = −0.03333 and it has symmetric spectrum due to real
signal.
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
40. Continuous Fourier transform
Discrete Fourier transform
References
Aliasing example: two frequency signal
Let’s say we have a signal containing two sinusoidal signal of
frequency 0.05 and 0.0125. The sampling interval is 1. We have
the signal
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
41. Continuous Fourier transform
Discrete Fourier transform
References
Aliasing example: spectrum of two frequency signal
and we have its spectrum
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
42. Continuous Fourier transform
Discrete Fourier transform
References
Aliasing example: downsampled two frequency signal
Doing same undersampling with interval 12.
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
43. Continuous Fourier transform
Discrete Fourier transform
References
Aliasing example: DFT of downsampled signal
We have the spectrum of downsampled signal.
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
44. Continuous Fourier transform
Discrete Fourier transform
References
Filtering
We now want to get one of the two frequency out of the signal.We
will adapt a proper rectangular window to the spectrum.
Assuming we have a filter function w(f ) and a multi-frequency
signal f (t), we simply do following steps to get the frequency band
we want.
F−1
{w(f )F{f (t)}} (32)
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
45. Continuous Fourier transform
Discrete Fourier transform
References
Filtering example: filtering window and signal spectrum
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
46. Continuous Fourier transform
Discrete Fourier transform
References
Filtering example: filtered signal
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
47. Continuous Fourier transform
Discrete Fourier transform
References
Outline
1 Continuous Fourier transform
2 Discrete Fourier transform
3 References
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
48. Continuous Fourier transform
Discrete Fourier transform
References
References
Supplementary Notes of General Physics by Jyhpyng Wang,
http:
//idv.sinica.edu.tw/jwang/SNGP/SNGP20090621.pdf
http://en.wikipedia.org/wiki/Fourier_series
http://en.wikipedia.org/wiki/Fourier_transform
http://en.wikipedia.org/wiki/Aliasing
http://en.wikipedia.org/wiki/Nyquist-Shannon_
sampling_theorem
MATHEMATICAL METHODS FOR PHYSICISTS by George
B. Arfken and Hans J. Weber. ISBN-13: 978-0120598762
Numerical Recipes 3rd Edition: The Art of Scientific
Computing by William H. Press (Author), Saul A. Teukolsky.
ISBN-13: 978-0521880688Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis
49. Continuous Fourier transform
Discrete Fourier transform
References
References
Chapter 12 and 13 in
http://www.nrbook.com/a/bookcpdf.php
http://docs.scipy.org/doc/scipy-0.14.0/reference/fftpack.html
http://docs.scipy.org/doc/scipy-0.14.0/reference/signal.html
Zong-han, Xieicbm0926@gmail.com Introduction to Fourier transform and signal analysis