Lecture Note05
Lecture Note05
阳佳桦,Ph.D.,副教授
广西大学土木建筑工程学院,工程力学研究中心
Email: [email protected]
Dr. Jia-Hua Yang, Ph.D., Associate Professor
College of Civil Engineering and Architecture
Scientific Research Center of Engineering Mechanics
Guangxi University
Contents
Fourier Series (FS)
2
Fourier Series
A periodic process
𝑥 𝑡+𝑇 =𝑥 𝑡
3
𝑎𝑘 and 𝑏𝑘 are the (real) Fourier series coefficients. 𝑎0 accounts for the
non-oscillatory level of the process.
𝑇
1 2
𝑎0 = න 𝑥 𝑡 𝑑𝑡
𝑇 −𝑇
2
𝑇
2 2
𝑎𝑘 = න 𝑥 𝑡 cos𝜔𝑘 𝑡 𝑑𝑡
𝑇 −𝑇
2
𝑇
2 2
𝑏𝑘 = න 𝑥 𝑡 sin𝜔𝑘 𝑡 𝑑𝑡, 𝑘 = 1, 2, …
𝑇 −𝑇
2
𝑇 𝑇
Note that the integration domain need not necessarily be − , . It can
2 2
be any continuous interval of the signal period 𝑇.
4
Proof.
𝑇 𝑇
To derive 𝑎0 , integrating both sides of the Fourier series in − ,
2 2
gives
𝑇 𝑇 ∞ 𝑇 ∞ 𝑇
2 2 2 2
න 𝑥 𝑡 𝑑𝑡 = 𝑎0 න 𝑑𝑡 + 𝑎𝑘 න cos𝜔𝑘 𝑡𝑑𝑡 + 𝑏𝑘 න sin𝜔𝑘 𝑡𝑑𝑡
𝑇 𝑇 𝑇 𝑇
− − 𝑘=1 − 𝑘=1 −
2 2 2 2
=0 =0
𝑇
1 2
⟹ 𝑎0 = න 𝑥 𝑡 𝑑𝑡
𝑇 −𝑇
2
To derive 𝑎𝑘 and 𝑏𝑘 , note the following equations
5
Au SK, 2018. Operational Modal Analysis. Modeling, Bayesian Inference, Uncertainty Laws. Springer.
6
Au SK, 2018. Operational Modal Analysis. Modeling, Bayesian Inference, Uncertainty Laws. Springer.
Multiplying both sides of the Fourier series with and
integrating gives
𝑎𝑘 is then obtained.
7
Au SK, 2018. Operational Modal Analysis. Modeling, Bayesian Inference, Uncertainty Laws. Springer.
Multiplying both sides of the Fourier series with sin 𝜔𝑘 𝑡 and integrating
gives
𝑇
2
න 𝑥 𝑡 sin 𝜔𝑘 𝑡 𝑑𝑡
𝑇
−2
𝑇 ∞ 𝑇
2 2
= 𝑎0 න sin 𝜔𝑘 𝑡 𝑑𝑡 + 𝑎𝑘 න cos𝜔𝑗 𝑡 sin 𝜔𝑘 𝑡 𝑑𝑡
𝑇 𝑇
−2 𝑗=1 −2
=0 =0
∞ 𝑇
2
+ 𝑏𝑘 න sin𝜔𝑗 𝑡 sin 𝜔𝑘 𝑡 𝑑𝑡
𝑇
𝑗=1 −2
𝑇
= if 𝑗=𝑘
2
Au SK, 2018. Operational Modal Analysis. Modeling, Bayesian Inference, Uncertainty Laws. Springer.
Fourier Series:
Complex Exponential Form
The complex exponential form will connect a Fourier series to the
Fourier Transform.
Euler’s formula
𝑒 i𝜃 = cos𝜃 + i sin𝜃,
𝑒 −i𝜃 = cos𝜃 − i sin𝜃, i2 = −1
cos𝜃 and sin𝜃 can be written in terms of 𝑒 ±i𝜃 using Euler’s formula
𝑒 i𝜃 − 𝑒 −i𝜃
sin𝜃 =
2i
𝑒 i𝜃 + 𝑒 −i𝜃
cos𝜃 =
2
9
Au SK, 2018. Operational Modal Analysis. Modeling, Bayesian Inference, Uncertainty Laws. Springer.
Substituting these two cosine and sine identities into the original Fourier
series gives
∞ ∞
𝑎𝑘 i𝜔 𝑡 −i𝜔 𝑡
i𝑏𝑘 i𝜔 𝑡
𝑥 𝑡 = 𝑎0 + 𝑒 𝑘 +𝑒 𝑘 +− 𝑒 𝑘 − 𝑒 −i𝜔𝑘 𝑡
2 2
𝑘=1 𝑘=1
∞ ∞
1 i𝜔𝑘 𝑡
1
=𝑎
ด0 + 𝑎𝑘 − i𝑏𝑘 𝑒 + 𝑎𝑘 + i𝑏𝑘 𝑒 −i𝜔𝑘 𝑡
2 2
𝑘=1 𝑘=1
𝑐0
𝑐𝑘 𝑐−𝑘
13
Au SK, 2018. Operational Modal Analysis. Modeling, Bayesian Inference, Uncertainty Laws. Springer.
Proof of Parseval equality using complex Fourier series:
Writing
14
Au SK, 2018. Operational Modal Analysis. Modeling, Bayesian Inference, Uncertainty Laws. Springer.
Fourier Transform (FT): From FS to FT
If a process is not periodic, it CANNOT be written as a Fourier series,
but it can be represented as a sum of harmonics with infinitesimal
contributions at a continuum of frequencies. The Fourier Transform
(FT) pair:
1 ∞ i𝜔𝑡
The Inverse Fourier Transform
𝑥 𝑡 = න 𝑋 𝜔 𝑒 𝑑𝜔 of 𝑋 𝜔 .
2𝜋 −∞
∞
𝑋 𝜔 = −∞ 𝑥 𝑡 𝑒 −i𝜔𝑡 𝑑𝑡 The Fourier Transform of 𝑥 𝑡 .
15
Au SK, 2018. Operational Modal Analysis. Modeling, Bayesian Inference, Uncertainty Laws. Springer.
The idea is to consider one segment of 𝑥 𝑡 and treat it as a periodic
𝑇
process 𝑥𝑝 𝑡 with period 𝑇. That is, within the range − <𝑡<
2
𝑇
,𝑥 𝑡 = 𝑥 𝑡 , and 𝑥𝑝 𝑡 repeats this segment of 𝑥 𝑡 periodically
2 𝑝
𝑇 𝑇
outside − < 𝑡 < . See the following illustration.
2 2
𝑥 𝑡
𝑇 𝑇
−
2 2
𝑥𝑝 𝑡
16
Au SK, 2018. Operational Modal Analysis. Modeling, Bayesian Inference, Uncertainty Laws. Springer.
Fourier Transform: From FS to FT
The FS coefficients of 𝑥𝑝 𝑡 are (because 𝑥𝑝 𝑡 is periodic):
𝑇 𝑇
1 2 1 2
𝑐𝑘 = න 𝑥𝑝 𝑡 𝑒 𝑘 𝑑𝑡 = න 𝑥 𝑡 𝑒 −i𝜔𝑘𝑡 𝑑𝑡
−i𝜔 𝑡
𝑇 −𝑇 𝑇 −𝑇
2 2
𝑇 𝑇
Because 𝑥𝑝 𝑡 = 𝑥 𝑡 within − and
2 2
17
Au SK, 2018. Operational Modal Analysis. Modeling, Bayesian Inference, Uncertainty Laws. Springer.
Fourier Transform: From FS to FT
Using Cauchy-Schwartz inequality,
2
𝑁 𝑁 𝑁
2 2
𝑥𝑖 𝑦𝑖 ≤ 𝑥𝑖 𝑦𝑖
𝑖=1 𝑖=1 𝑖=1
2
1 2
−i𝜔𝑘 𝑡 𝑒 −i𝜔𝑘 𝑡 2 = 1
𝑐𝑘 = 2 න 𝑥 𝑡 𝑒 𝑑𝑡
𝑇 −𝑇
2
𝑇 𝑇
∞
1 2 2 2 2 1
≤ 2 න 𝑥 𝑡 𝑑𝑡 × න 𝑒 −i𝜔𝑘 𝑡 𝑑𝑡 ≤ න 𝑥 2 𝑡 𝑑𝑡
𝑇 −𝑇 −
𝑇 𝑇 −∞
2 2
∞ 𝑇
18 ≤−∞ 𝑥 2 𝑡 𝑑𝑡
Au SK, 2018. Operational Modal Analysis. Modeling, Bayesian Inference, Uncertainty Laws. Springer.
Fourier Transform: From FS to FT
This inequality indicates that when 𝑇 → ∞, 𝑐𝑘 → 0 no matter
what process 𝑥 𝑡 is (because signal energy is finite), so FS
coefficients are not suitable for non-periodic processes.
1
To obtain FT, first take away the problematic factor from FS
𝑇
and define the following term:
𝑇
2
𝑋𝑝 𝜔𝑘 = න 𝑥 𝑡 𝑒 −i𝜔𝑘𝑡 𝑑𝑡
𝑇
−2
2𝜋
Note that when 𝑇 → ∞, ∆𝜔 = → 𝑑𝜔 (infinitly small), and the
𝑇
discrete 𝜔𝑘 tends to the continuous 𝜔.
21
Au SK, 2018. Operational Modal Analysis. Modeling, Bayesian Inference, Uncertainty Laws. Springer.
Fourier Transform: From FS to FT
The infinite sum becomes an integral
1 ∞ The Inverse Fourier
𝑥 𝑡 = i𝜔𝑡
න 𝑋(𝜔)𝑒 𝑑𝜔 Transform of 𝑋 𝜔 .
2𝜋 −∞
This factor looks strange, but it ensures that the unit is right. 𝑋(𝜔) is in
V/Hz (See the unit of the FT in the following). On the left 𝑥 𝑡 is in V,
where so we need Hz on the right to cancel with V/Hz. But 𝑑𝜔 is in rad/s, so
we need 1Τ2𝜋 to make 𝑑𝜔Τ2𝜋 = Hz
𝑇
2
𝑋 𝜔 = lim 𝑋𝑝 𝜔𝑘 = lim න 𝑥 𝑡 𝑒 −i𝜔𝑘𝑡 𝑑𝑡
𝑇→∞ 𝑇→∞ −𝑇
2 If 𝑥 𝑡 in V, and the unit of 𝑑𝑡 is s,
∞ then the unit of 𝑋 𝜔 is V ∙ s = V/Hz.
= −∞ 𝑥 𝑡 𝑒 −i𝜔𝑡 𝑑𝑡
It also says that signal energy in time and frequency domain is equal.
Au SK, 2018. Operational Modal Analysis. Modeling, Bayesian Inference, Uncertainty Laws. Springer.
Fourier Transform:
Discrete-Time FT and FFT
Data are recorded in discrete time in practice, so we consider the
discrete-time FT:
𝑁𝑗 −1
∞
𝑋 𝜔 = න 𝑥 𝑡 𝑒 −i𝜔𝑡 𝑑𝑡 ≈ 𝑋 𝜔 = 𝑥𝑗 𝑒 −i𝜔𝑗∆𝑡 ∆𝑡
−∞ 𝑗=0
2𝜋𝑘
We only calculate it at discrete frequencies 𝜔𝑘 = , because
𝑁𝑗 ∆𝑡
we have an efficient algorithm to do it:
2𝜋𝑘
𝑁𝑗 −1 −i𝑁 ∆𝑡𝑗∆𝑡 𝑁𝑗 −1
𝑋 𝜔𝑘 = σ𝑗=0 𝑥𝑗 𝑒 𝑗 ∆𝑡 = σ𝑗=0 𝑥𝑗 𝑒 −i2𝜋𝑗𝑘Τ𝑁𝑗 ∆𝑡
24
Au SK, 2018. Operational Modal Analysis. Modeling, Bayesian Inference, Uncertainty Laws. Springer.
Fourier Transform:
Discrete-Time FT and FFT
Lose ∆𝑡 and we define the fast Fourier Transform (FFT) used in
MATLAB:
𝑁𝑗 −1
𝑦𝑘 = σ𝑗=0 𝑥𝑗 𝑒 −i2𝜋𝑗𝑘Τ𝑁𝑗 , 𝑘 = 0, 1, … , 𝑁𝑗 − 1
We can show that the inverse FFT recovers the original discrete time
series that produces the FFT, i.e., 𝑥𝑗 = 𝑧𝑗 , 𝑗 = 1, ⋯ , 𝑁 − 1. Substituting
into the above inverse FFT:
Au SK, 2018. Operational Modal Analysis. Modeling, Bayesian Inference, Uncertainty Laws. Springer.
𝑘
For the first case when 𝑘 is an integer multiple of 𝑁, 𝑝 = , 𝑒 i2𝜋𝑗𝑝 = 1,
𝑁
so the sum is 𝑁.
For the second case, using the geometric series summation formula, with
𝑎 = 𝑒 i2𝜋𝑘/𝑁 ,
𝑁−1
𝑁
1 − 𝑎
𝑎𝑗 =
1−𝑎
𝑗=0
Using the above result we see that 𝑒 i2𝜋(𝑗−𝑟)𝑘/𝑁 in the inverse FFT is
non-zero only when 𝑗 = 𝑟 because 𝑘/𝑁 is not an integer.
Au SK, 2018. Operational Modal Analysis. Modeling, Bayesian Inference, Uncertainty Laws. Springer.
Conjugate Mirror Property of FFT
FFT has the conjugate mirror property:
𝑦−𝑘 = 𝑦ത𝑘
𝑦− 𝑁−𝑘 = 𝑦ത𝑁−𝑘
Proof:
28
Au SK, 2018. Operational Modal Analysis. Modeling, Bayesian Inference, Uncertainty Laws. Springer.
About half of the FFT sequence carries redundant information, in the
sense that it can be produced as the complex conjugate of the other half.
𝑁𝑦𝑞 = the integer part of 𝑁/2, is the index at or just below the
‘Nyquist frequency’
29
Au SK, 2018. Operational Modal Analysis. Modeling, Bayesian Inference, Uncertainty Laws. Springer.
Parseval equality for FFT
30
Au SK, 2018. Operational Modal Analysis. Modeling, Bayesian Inference, Uncertainty Laws. Springer.
Distortions of Fourier series (FS): Aliasing and
Leakage
Aliasing
1
The approximation is valid only up to the ‘Nyquist frequency’ ( Hz).
2Δ𝑡
31
Au SK, 2018. Operational Modal Analysis. Modeling, Bayesian Inference, Uncertainty Laws. Springer.
Aliasing is not repairable after discrete-time sampling. Should filter out
high-frequency contents beyond the Nyquist frequency. Leakage can be
suppressed by increasing data duration.
Nyquist frequency
1 1
𝑓𝑁𝑦𝑞 = Hz (half of the sampling frequency)
2 Δ𝑡
𝜋
𝜔𝑁𝑦𝑞 = 2𝜋𝑓𝑁𝑦𝑞 = rad/s
Δ𝑡
Au SK, 2018. Operational Modal Analysis. Modeling, Bayesian Inference, Uncertainty Laws. Springer.
To transform the contributions to the ones at positive frequencies, use the
conjugate mirror property to separate the sum
Au SK, 2018. Operational Modal Analysis. Modeling, Bayesian Inference, Uncertainty Laws. Springer.
Aliasing Example (Au 2018).
Au SK, 2018. Operational Modal Analysis. Modeling, Bayesian Inference, Uncertainty Laws. Springer.
2𝑓𝑠 − 𝑓𝑘 = 2 × 10 − 6 = 4 Hz
𝑓𝑠 =10 Hz 2𝑓𝑠 − 𝑓𝑘 = 2 × 10 − 9 = 1 Hz
Au SK, 2018. Operational Modal Analysis. Modeling, Bayesian Inference, Uncertainty Laws. Springer.
Leakage
Au SK, 2018. Operational Modal Analysis. Modeling, Bayesian Inference, Uncertainty Laws. Springer.
Schematic plot of 𝐷𝑁 𝑢 . It indicates that the 𝑐𝑘Ƹ has the constributions
from the following frequencies:
Au SK, 2018. Operational Modal Analysis. Modeling, Bayesian Inference, Uncertainty Laws. Springer.
Leakage example.
Au SK, 2018. Operational Modal Analysis. Modeling, Bayesian Inference, Uncertainty Laws. Springer.
Leakage
2
𝑓𝑘 = 1.2 = 1.67 Hz
10
𝑓𝑘 = 1.2 ≈ 8.33 Hz
Aliased leakage 𝑓𝑠 − 𝑓𝑘 = 10 − 8.33 = 1.67 Hz
7
𝑓𝑘 = 1.2 ≈ 5.83 Hz
leakage
5 Aliased leakage 𝑓𝑠 − 𝑓𝑘 = 10 − 5.8
𝑓𝑘 = = 4.17 Hz
1.2
Au SK, 2018. Operational Modal Analysis. Modeling, Bayesian Inference, Uncertainty Laws. Springer.
Distortions of Fourier transform (FT): Aliasing
and Leakage
The discrete-time Fourier transform (DTFT) approximation is
related to the target FT by a convolution integral, which can be
used to explain aliasing and leakage of FT (we again skip the proof)
Au SK, 2018. Operational Modal Analysis. Modeling, Bayesian Inference, Uncertainty Laws. Springer.
FFT in MATLAB
Let be the FFT of . In MATLAB, we can use the built-
in function to calculate the FFT: y=fft(x). In MATLAB, the index
starts from 1, so the array y in MABLAB and the FFT in theory have
the following relationship
42
Au SK, 2018. Operational Modal Analysis. Modeling, Bayesian Inference, Uncertainty Laws. Springer.
Up to the Nyquist frequency
where Nq = floor(N/2)(integer part of N/2).
Au SK, 2018. Operational Modal Analysis. Modeling, Bayesian Inference, Uncertainty Laws. Springer.
FFT Algorithm
The key idea is that for 𝑁 being some power of 2, i.e., ,a
FFT sequence of length 𝑁 can be obtained from two FFT sequences
of length 𝑁/2; and similarly each FFT sequence of length 𝑁/2 can
be obtained from another two FFT sequences of length 𝑁/4; and so
on.
44
Au SK, 2018. Operational Modal Analysis. Modeling, Bayesian Inference, Uncertainty Laws. Springer.
Au SK, 2018. Operational Modal Analysis. Modeling, Bayesian Inference, Uncertainty Laws. Springer.
Writing the previous equation here again for comparison
46
Au SK, 2018. Operational Modal Analysis. Modeling, Bayesian Inference, Uncertainty Laws. Springer.
47
Au SK, 2018. Operational Modal Analysis. Modeling, Bayesian Inference, Uncertainty Laws. Springer.