04.fourier Analysis
04.fourier Analysis
Analysis
A building (structure) has its own vibration characteristics, i.e., natural period, damping,
mode-shape, and so on during an earthquake.
Figure 1.1 shows earthquake records obtained at the ground surface (bottom), basement
(middle), and 8th floor (top) of the BRI Annex building during the earthquake that occurred on Oct.
5, 2004. You can easily recognize that the maximum acceleration at the basement is smaller than
those at the ground surface; the max acc at the 8th floor is more than 3 times as large as those at
the basement and clear phases with cyclic motion appear on the two horizontal components at the
8th floor. Figure 1.2 shows the Fourier spectra for the ground surface, basement, and 8th floor.
There are many peaks, 0.3Hz, 1.4Hz, 4Hz, and 10Hz. The predominating peak at 1.4Hz for the two
horizontal components of the 8th floor is supposed to be the natural period of this building.
The other peaks consist of the higher mode, torsion mode, predominant period of the deep
underground structure, and so on. These dynamic characteristics are important when you evaluate
adequate input seismic ground motion for seismic design.
Figure 1.1 Example of earthquake record obtained at the ground surface, basement, & top of
building
-1-
IISEE Lecture Note for Engineering Course 2005-2006 Structure Dynamics B-Fourier
Analysis
Figure 1.2 Fourier spectra at GL, basement, & 8th floor of building
Thanks to Fourier's Big Discovery, a signal in the time domain, such as a waveform, can
be converted into the frequency domain, showing us different features that may be vague in the
time domain.
-2-
IISEE Lecture Note for Engineering Course 2005-2006 Structure Dynamics B-Fourier
Analysis
Exercise 1
1-1) Using a spreadsheet, calculate & draw several Sine waves with different Amplitudes and
Frequencies.
1-2) Sum up these Sine waves in the time domain and draw the summed up wave.
ω= 0.125
Amp
-2
+
0.250
Amp
-2
+
0.375
Amp
-2
+
0.500
Amp
-2
+
0.625
Amp
-2
+
0.750
Amp
-2
+
0.875
Amp
-2
+
1.000
Amp
2
0
-2
0 4 8
||
Amp
8
4 Summed up Sine Wave
0
-4
-8
0.00 4.00 Time(s) 8.00
-3-
IISEE Lecture Note for Engineering Course 2005-2006 Structure Dynamics B-Fourier
Analysis
2-2 Finite Fourier Approximation, Finite Fourier Coefficient (Osaki, Y., 1985)
If x(t ) is a time series with equal sampling space ( Δt ) and data number N, the m th
sample's value x m can be expressed as eq.(2-1), as follows - "Thanks to Fourier's Big Discovery."
A N 2−1 ⎡ 2πkm 2πkm ⎤ AN 2 2π ( N 2)m
xm = 0 + ∑ ⎢ Ak cos + Bk sin ⎥ + 2 cos for m = 0,1,2,・・・・, N − 1
2 k =1 ⎣ N N ⎦ N
(2-1)
This equation shows that any time series can be expressed by a Finite Trigonometric
Series. The coefficients Ak and Bk are Finite Fourier Coefficients defined as
2 N −1 2πkm N N
Ak = ∑ x m cos for k = 0,1,2,・・・, − 1,
N m =0 N 2 2
2 N −1 2πkm N (2-2)
Bk = ∑ x m sin for k = 1,2,・・・, − 1
N m =0 N 2
The time t for the mth value is expressed as follows, using the equal sampling interval Δt .
t = mΔt
That is,
t
m=
Δt
By substituting m in eq.(2-1), the Finite Fourier Approximation is defined by
~ A N 2 −1
⎡ 2πkt 2πkt ⎤ AN 2 2π ( N 2)t
x (t ) = 0 + ∑ ⎢ Ak cos + B k sin ⎥ + cos
2 k =1 ⎣ NΔt NΔt ⎦ 2 NΔt
k
Substitute f k = ,
NΔt
N 2 −1 AN 2
x (t ) = 0 + ∑ [Ak cos 2πf k t + Bk sin 2πf k t ] +
~ A
cos 2πf N 2 t (2-3)
2 k =1 2
What is the meaning of each term?
A 1 N −1
The first term 0 = ∑ x m is the mean value for all of the sample wave values. The second term
2 N m =0
is the summation of the waveforms with different frequencies, i.e.,
N 2 −1 N 2 −1
∑ [ Ak cos 2π f k t + B k sin 2π f k t ] = ∑ X k cos( 2π f k t + φ k ) ,
k =1 k =1
B
where X k = Ak2 + Bk2 , φ k = tan −1 (− k )
Ak
AN
X k is Amplitude and φ k is phase difference. The third term cos 2πf k t corresponds to a wave
2
2
with fN 2 frequency. Consequently, eq. (2-3) shows that the original wave is disintegrated
elemental waves with different frequencies. In other word, the Amplitudes and Phases for several
frequencies characterize the feature of a waveform in the frequency domain. And the amplitude
NΔt
X k multiplied by , which is the half duration of the waveform, is the Fourier amplitude Fk .
2
NΔt
If you show X k multiplied by on a graph, it's a Fourier spectrum.
2
T T N N
Fk = X k = Ak2 + B k2 for k = 0,1,2,・・・, − 1,
2 2 2 2
Example1
Let's consider a sample waveform with an equal sampling interval (Δ=0.5sec) and 16 data
samples (N=16). The data values are in Table 2.1 and the waveform is depicted in Figure 2.1.
-4-
IISEE Lecture Note for Engineering Course 2005-2006 Structure Dynamics B-Fourier
Analysis
Table 2.1 Data values of sample waveform
Time 0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 6.5 7.0 7.5
Value 5 32 38 -33 -19 -10 1 -8 -20 10 -1 4 11 -1 -7 -2
X2
40
Sample Wave
X1
Amp.
0
X0 X3 X15
X14
-40
0 2 4 6 Time(s) 8
Figure 2.1 Sample waveform
N N
The Finite Fourier Coefficients Ak and Bk for k = 0,1,2,・・・, − 1, determined by eq.(2-2) are
2 2
shown in Table 2.2. Figure 2.2 shows 8 waveforms determined by the finite Fourier coefficients Ak
N N
and Bk for k = 0,1,2,・・・, − 1, . You can find that each waveform shows a certain amplitude
2 2
(= X k ) and phase (= φ k ) as inserted in Table 2.1.
-5-
IISEE Lecture Note for Engineering Course 2005-2006 Structure Dynamics B-Fourier
Analysis
10
T1=NΔt
Amp.
0
-10
0.0 2.0 Time(s) 4.0 6.0 8.0
15
T1=NΔt/2
Amp.
0
-15
0.0 2.0 Time(s) 4.0 6.0 8.0
15
T1=NΔt/3
Amp.
-15
0.0 2.0 Time(s) 4.0 6.0 8.0
15
T1=NΔt/4
Amp.
-15
0.0 2.0 Time(s) 4.0 6.0 8.0
10
T1=NΔt/5
Amp.
-10
0.0 2.0 Time(s) 4.0 6.0 8.0
10
T1=NΔt/6
Amp.
-10
0.0 2.0 Time(s) 4.0 6.0 8.0
7
T1=NΔt/7
Amp.
-7
0.0 2.0 Time(s) 4.0 6.0 8.0
7
T1=NΔt/8
Amp.
-7
0.0 2.0 Time(s) 4.0 6.0 8.0
50
38 Sample Wave
32
10 11
Amp.
0 5 1 -1 4 -1 -2
-10 -8 -7
-19 -20
-33
-50
0.0 2.0 4.0 6.0 Time(s) 8.0
Figure 2.2 Waveforms determined by the Finite Fourier Coefficients and the summed waveform
(bottom)
Exercise 2
2-1) For the summed up waveform from “Exercise1,” calculate the Finite Fourier Coefficients, Ak &
Bk, by applying “Fourier’s Big Discovery.”
2-2) Evaluate the Fourier Amplitude and Phase angle using the calculated Ak & Bk.
-6-
IISEE Lecture Note for Engineering Course 2005-2006 Structure Dynamics B-Fourier
Analysis
How about Amplitude? Figures 2.3 and 2.4 depict Amplitude( X k ) and Fourier
amplitude( Fk ). The difference is the unit of the vertical axis, which is multiplied by 4 to correspond
NΔt
to . If the horizontal axis of Figure 2.4 is expressed by Hz (or Period) like Figure 2.5, it
2
represents the popular Fourier spectrum.
15 60
Fourier Amp.(cm/s/s*sec)
10 40
Amp.(cm/s/s)
5 20
0 0
1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8
k k
Figure 2.3 Amplitude ( X k ) of sample waveform Figure 2.4 Fourier amplitude( Fk ). of sample
waveform
60
Fourier Amp.(cm/s/s*sec)
40
20
0
0 0.2 0.4 0.6 0.8 1 1.2
Hz
Referring to the bottom figure in Figure 2.2, the original wave (blue) and the summed one
(pink) show differences, except for the sampled points depicted by diamonds. This is because the
Fourier transformed coefficients ( Ak and Bk ) ensure the passing sampled points. The Fourier
transform has limitations in the analyzable frequency range depending on the sampling interval
( Δt ) and data duration ( t dur ), i.e., elapsed time. Respectively, the minimum and maximum
frequencies are 1 t dur and 1 (2Δt ) , which is the Nyquest frequency.
If the sampling frequency is not sufficient for an input signal, it causes a strange
phenomenon. Figure 2.6 shows the relation between the original input signal (pink) and the
sampled waveform (blue) for several cosine waves. In these cases, the sampling frequency is 20Hz.
For waves with a frequency of 2.5Hz to the Nyquest frequency (10Hz), the sampled signals can
show the characteristics of the original waveform. In contrast, waves with a frequency over 10Hz
cannot explain the original signal. Still more, the waveforms sampled at 12.5Hz and 15Hz are
equal to ones sampled at 7.5Hz and 5.0Hz, respectively. Waves with a predominant frequency
higher than the Nyquest frequency are recognized as false waves.
-7-
IISEE Lecture Note for Engineering Course 2005-2006 Structure Dynamics B-Fourier
Analysis
2.5Hz 1.0 20 Hz Sampling
15.0Hz 1.0
0.5 Original 0.5
Amp
Amp
0.0 0.0
-0.5 -0.5
-1.0 -1.0
0 0.4 Time(s) 0.8 0 0.4 Time(s) 0.8
5.0Hz 1.0
17.5Hz 1.0
0.5 0.5
Amp
Amp
0.0 0.0
-0.5 -0.5
-1.0 -1.0
0 0.4 Time(s) 0.8 0 0.4 Time(s) 0.8
7.5Hz 1.0
20.0Hz 1.0
0.5 0.5
Amp
Amp
0.0 0.0
-0.5 -0.5
-1.0 -1.0
0 0.4 Time(s) 0.8 0 0.4 Time(s) 0.8
10.0Hz 1.0
22.5Hz 1.0
0.5 0.5
Amp
Amp
0.0 0.0
-0.5 -0.5
-1.0 -1.0
0 0.4 Time(s) 0.8 0 0.4 Time(s) 0.8
12.5Hz 1.0
25.0Hz 1.0
0.5 0.5
Amp
Amp
0.0 0.0
-0.5 -0.5
-1.0 -1.0
0 0.4 Time(s) 0.8 0 0.4 Time(s) 0.8
Therefore,
-8-
IISEE Lecture Note for Engineering Course 2005-2006 Structure Dynamics B-Fourier
Analysis
Nm Nm
AN 2 i ( 2π ) 1 i ( 2π )
e 2 N = ( AN − iB N )e 2 N
2 2 2 2
Where, B N = 0 .
2
For the fourth term, using the following relations,
Exercise 3
Conduct a normal and inverse Fourier Transform for a sample waveform.
-9-
IISEE Lecture Note for Engineering Course 2005-2006 Structure Dynamics B-Fourier
Analysis
500 500
NS
200 200
100 100
20 20
10 10
5 5
2 2
1 1
.5 .5
.05 .1 .2 .5 1 2 5 .05 .1 .2 .5 1 2 5
Period(s) Period(s)
Figure 2.7 Comparison of raw and smoothed Fourier spectrum
where G ( f ) is the raw power spectrum, G ( f ) is the smoothed one, and W ( f ) is the spectral
window. W ( f ) must have two necessary characteristics. These are area equality and a symmetric
property.
∞
∫ W ( f )df = 1
−∞
W ( f ) = W (− f )
There are too many functions that satisfy the above two necessities. I would like to introduce
three spectral windows, the Rectangle, Bartlett, and Parzen windows. These windows are
expressed as
⎛ sin 2πuf ⎞
Rectangle window W ( f ) = 2u ⎜⎜ ⎟⎟ (2-9)
⎝ 2πuf ⎠
2
⎛ sin πuf ⎞
Bartlett window W ( f ) = u ⎜⎜ ⎟⎟ (2-10)
⎝ πuf ⎠
πuf
4
⎛ ⎞
3 ⎜ ⎟
sin
Parzen window W ( f ) = u⎜ 2 ⎟ (2-11)
4 ⎜ πuf ⎟
⎜ ⎟
⎝ 2 ⎠
where u is a constant.
The graphs are depicted in Fig 2.8. You can find a negative value in the Rectangle window
and it sometimes has a negative effect on the spectrum. So I usually use the Parzen window for
smoothing.
- 10 -
IISEE Lecture Note for Engineering Course 2005-2006 Structure Dynamics B-Fourier
Analysis
1.5
Rectangle Bartlett
2.0
1.0
1.0
0.5
0.0
-1.0 f 0.0 f
-2 -1 0 1 2 -2 -1 0 1 2
1.5
Parzen
1.0
0.5
1 τ≤ u
Rectangle window w(τ) =
0 τ> u
τ
1− τ≤ u
u
Bartlett window w(τ) =
0 τ> u
3
⎛τ⎞
2
⎛τ⎞ u
1− 6⎜ ⎟ + 6⎜⎜ ⎟⎟ τ≤
⎝u⎠ ⎝u⎠ 2
3
⎛ τ⎞ u
Parzen window w(τ) = 2⎜⎜1− ⎟⎟ ≤τ≤ u
⎝ u⎠ 2
0 τ> u
- 11 -
IISEE Lecture Note for Engineering Course 2005-2006 Structure Dynamics B-Fourier
Analysis
The graphs of these Lag windows are depicted in Fig 2.9. You can easily understand why the
"Rectangle window" is called a "Rectangle."
w(τ)
1.2
Rectangle
1.0
0.8
0.6
Bartlett
0.4
Parzen
0.2
0.0
0 0.5 1 τ
y(t):Output
x(t):Input
Figure 2.10 Image of Input & Output signals for SDOF system
- 12 -
IISEE Lecture Note for Engineering Course 2005-2006 Structure Dynamics B-Fourier
Analysis
2-7 Coherence
Like the transfer function and cross correlation function, coherence is a way to examine
the characteristics of a signal, such as earthquake and microtremor data, by comparison with a
referrence. Considering two timeseries signal, x(t ) and y (t ) , it’s defined as
2
[ ]
C xy ( f )
coh( f ) = coh ( f ) =
2
(2-13)
C xx ( f )C yy ( f )
where C xy ( f ) is the cross spectrum of the two signals x(t ) and y (t ) , and C xx ( f ) and C yy ( f )
are the power spectra for x(t ) and y (t ) , respectively. This value coh( f ) is surely 1.0 unless
smoothing is applied. The ways of perfoming this smoothing are taking the mean spectrum or
2
apply a smoothing filter. The smoothing technique should be used for C xy ( f ) , C xx ( f ) , and
C yy ( f ) separately.
- 13 -
IISEE Lecture Note for Engineering Course 2005-2006 Structure Dynamics B-Fourier
Analysis
If you are not good at making/handling calculation programs, similar tools are available in
commercial software like MS-Excel because they have analytical tools like Fourier analysis and
moving average. For instance, the way to use the FFT tool in Excel is as follows.
Before using the FFT tool, you have to confirm whether or not the Fourier analysis tool
has been installed on your PC. Let’s start Microsoft Excel by choosing [Start]
Æ[Programs]Æ[Microsoft Excel].
(1) Choose menu [Tools]Æ [Data Analysis…] to call the Data Analysis dialog box. If [Data
Analysis…] doesn’t appear, choose menu [Tools]Æ [Add-ins…] to call the Add-ins dialog.
Figure 3.1
(2) Check [Analysis ToolPak] and click [OK]. The Fourier analysis package will be installed
automatically on your PC.
Figure 3.2
- 14 -
IISEE Lecture Note for Engineering Course 2005-2006 Structure Dynamics B-Fourier
Analysis
(3) In order to use the Fourier analysis tool, choose menu [Tools]Æ[Data Analysis…] to open the
Data Analysis dialog box.
Figure 3.3
(4) Choose [Fourier Analysis] and click [OK], and the [Fourier Analysis] dialog will be opened.
Figure 3.4
Let’s start an example calculation with the “sample waveform” used in Chapter 2. In
Figure 3.4, the data interval and data values are put into cells A6 to A21 (red rectangles) and B6 to
B21 (green rectangles), respectively. The cells C6 to C21 (blue rectangles) are FFT complex results.
A sample waveform is drawn using the “X-Y(Scatter)” chart type.
- 15 -
IISEE Lecture Note for Engineering Course 2005-2006 Structure Dynamics B-Fourier
Analysis
Figure 3.5
For calculation,
(1) Choose menu [Tools]Æ[Data Analysis…] to call the [Fourier Analysis] dialog.
Figure 3.6
(2) Select/put surely [Input] and [Output options]. In this case, data area “$B$6:$B$21” and
“$C$6:$C$21” are selected. Then when you click on the [OK] button, the FFT results will fill
the C6 to C21 cells.
- 16 -
IISEE Lecture Note for Engineering Course 2005-2006 Structure Dynamics B-Fourier
Analysis
Figure 3.7
Next, you have to calculate the period (or frequency) and Fourier amplitude. As shown in
Figure 3.8, the available periods are derived from elapsed time (=N*DT) divided by 1 to N/2, where
N is the number of values and DT is the sampling interval. Or the available frequencies are
integral multiples (k) of the fundamental frequency 1/(N*DT) described by k/(N*DT). In this case,
the available periods (frequencies) are 8.0(0.125), 4.0(0.250), 2.667(0.375), 2.0(0.50), 1.60(0.625),
1.333(0.75), 1.143(0.875), and 1.0(1.0) seconds (Hz). In cells G7 to G14, Fourier Amplitude values
are calculated by multiplying the absolute values of the FFT result (cells C7 to C14) by the
sampling interval DT, not the elapsed time N*DT, because the values of the FFT results are
multiplied by N, the number of values.
Using the frequency values in cells G7 to G14 and the Fourier Amplitude in cells H7 to
H14, a Fourier spectrum is drawn with the “X-Y(Scatter)” chart type.
- 17 -
IISEE Lecture Note for Engineering Course 2005-2006 Structure Dynamics B-Fourier
Analysis
Figure 3.8
Exercise 4
Calculate a Fourier spectrum for the Kobe Earthquake record. If you use Excel, the
following format converted data file will make it convenient.
Kobe JMA NS 1995/01/17 05:46
.000 -0.04
.020 -0.04
.040 -0.04
.060 -0.01
.080 0.02
.100 0.02
.120 0.02
.140 0.02
.160 0.02
.180 0.02
.200 0.02
….
….
References
Transnational College of LEX (1995). Who is Fourier? A mathematical adventure, Language
Research Foundation, 3-68.
Osaki, Y. (1985). Introduction of spectral analysis on earthquake motion, 43-169.
William H. Press et al. (1992). Numerical Recipes in Fortran (Second Edition) Cambridge
University Press, 490-529.
- 18 -