An Introduction to Short-Time Fourier Transform...

27
4/7/2014 1 An Introduction to Short - Time Fourier Transform (STFT) Advanced Structural Dynamics M Ahmadizadeh, PhD, PE Contents Scope and Goals Fourier Transform Review Advantages of Fourier Transform Limitations of Fourier Transform Short Time Fourier Transform – Concept – Formulation – Examples Use of MATLAB – Applications 2

Transcript of An Introduction to Short-Time Fourier Transform...

Page 1: An Introduction to Short-Time Fourier Transform (STFT)sharif.ir/~ahmadizadeh/courses/advstdyn/Short-Time Fourier... · An Introduction to Short-Time Fourier Transform ... •Use of

4/7/2014

1

An Introduction toShort-Time Fourier Transform (STFT)

Advanced Structural Dynamics

M Ahmadizadeh, PhD, PE

Contents

• Scope and Goals

• Fourier Transform Review

– Advantages of Fourier Transform

– Limitations of Fourier Transform

• Short Time Fourier Transform

– Concept

– Formulation

– Examples

• Use of MATLAB

– Applications

2

Page 2: An Introduction to Short-Time Fourier Transform (STFT)sharif.ir/~ahmadizadeh/courses/advstdyn/Short-Time Fourier... · An Introduction to Short-Time Fourier Transform ... •Use of

4/7/2014

2

Scope and Goals

• To expand the capabilities of Fourier transform for time-varying signals

• In addition to showing the frequency content of the signals, it is also desirable to have an idea of when each frequency content is dominant

• Describing complicated signals with fewer number of frequencies

3

Fourier Transform

• Fourier analysis expands signals or functions in terms of sinusoids (or complex exponentials).

• It reveals all frequency components present in a signal.

4

Inverse DFT

DFT

Page 3: An Introduction to Short-Time Fourier Transform (STFT)sharif.ir/~ahmadizadeh/courses/advstdyn/Short-Time Fourier... · An Introduction to Short-Time Fourier Transform ... •Use of

4/7/2014

3

Fourier Transform

• Example: 5 Hz Signal

5

0 0.2 0.4 0.6 0.8 1-1

-0.5

0

0.5

15 Hz

Time (s)

Sig

nal

0 20 40 60 80 1000

10

20A

mplit

ude

Output

0 20 40 60 80 100-5

0

5

Frequency (Hz)

Phase

0 20 40 60 80 1000

10

20

Am

plit

ude

Output

0 20 40 60 80 1000

5

10

Frequency (Hz)

Phase

0 0.2 0.4 0.6 0.8 1-1

-0.5

0

0.5

115 Hz

Time (s)

Sig

nal

Fourier Transform

• Example: 15 Hz Signal

6

Page 4: An Introduction to Short-Time Fourier Transform (STFT)sharif.ir/~ahmadizadeh/courses/advstdyn/Short-Time Fourier... · An Introduction to Short-Time Fourier Transform ... •Use of

4/7/2014

4

0 20 40 60 80 1000

10

20A

mplit

ude

Output

0 20 40 60 80 1000

5

10

Frequency (Hz)

Phase

0 0.2 0.4 0.6 0.8 1-1

-0.5

0

0.5

130 Hz

Time (s)

Sig

nal

Fourier Transform

• Example: 30 Hz Signal

7

0 0.2 0.4 0.6 0.8 1-3

-2

-1

0

1

2

33 Frequencies

Time (s)

Sig

nal

Fourier Transform

• Example: Signal Containing 5, 15 and 30 Hz Components

8

0 20 40 60 80 1000

5

10

15

Am

plit

ude

Output

0 20 40 60 80 1000

5

10

Frequency (Hz)

Phase

Page 5: An Introduction to Short-Time Fourier Transform (STFT)sharif.ir/~ahmadizadeh/courses/advstdyn/Short-Time Fourier... · An Introduction to Short-Time Fourier Transform ... •Use of

4/7/2014

5

Fourier Transform - Limitations

• Cannot provide information about both time and frequency – i.e. cannot provide simultaneous time and frequency localization

– Not suitable for analyzing time-variant, non-stationary signals

• As an example, it cannot be used to analyze the signals obtained from nonlinear or damaged structures, since they may contain varying frequency content at different times

9

Fourier Transform - Limitations

• Signals: Stationary vs Non-stationary

– Stationary signals have properties (e.g frequency content) that does not change over time

– Non-stationary signals may have different frequencies at different times

10

0 0.2 0.4 0.6 0.8 1-3

-2

-1

0

1

2

33 Frequencies

Time (s)

Sig

nal

0 0.2 0.4 0.6 0.8 1-1

-0.5

0

0.5

13 Frequencies

Time (s)

Sig

nal

Sum of 3 signals, present at all times

Combination of 3 signals occurring at different times

Page 6: An Introduction to Short-Time Fourier Transform (STFT)sharif.ir/~ahmadizadeh/courses/advstdyn/Short-Time Fourier... · An Introduction to Short-Time Fourier Transform ... •Use of

4/7/2014

6

0 0.2 0.4 0.6 0.8 1-1

-0.5

0

0.5

13 Frequencies

Time (s)

Sig

nal

Fourier Transform - Limitations

• 5, 15 and 30 Hz Components at Different Times

11

0 20 40 60 80 1000

2

4

Am

plit

ude

Output

0 20 40 60 80 100-100

-50

0

50

Frequency (Hz)

Phase

Excellent frequency localization (shows all existing frequencies), but no time localization

Fourier Transform - Limitations

• Not appropriate for representing discontinuities or sharp corners

– Requires a large number of Fourier components to represent discontinuities).

12

Page 7: An Introduction to Short-Time Fourier Transform (STFT)sharif.ir/~ahmadizadeh/courses/advstdyn/Short-Time Fourier... · An Introduction to Short-Time Fourier Transform ... •Use of

4/7/2014

7

Fourier Transform - Limitations

• El Centro Earthquake Record and its Fourier transform

13

0 5 10 15 20 25 30 35-4

-3

-2

-1

0

1

2

3El Centro

Time

Accele

ration

0 5 10 15 20 25 300

1

2

3

Am

plit

ude

Output

0 5 10 15 20 25 30-500

0

500

Frequency (Hz)

Phase

Fourier Transform - Limitations

• El Centro Earthquake Record and its Fourier transform

14

0 5 10 15 20 25 30 35-4

-3

-2

-1

0

1

2

3El Centro

Time

Acce

lera

tio

n

Included Signals: 1

0 5 10 15 20 25 30 35-1

-0.5

0

0.5

1x 10

-3 El Centro - Components: 1

Time

Acce

lera

tio

n

Page 8: An Introduction to Short-Time Fourier Transform (STFT)sharif.ir/~ahmadizadeh/courses/advstdyn/Short-Time Fourier... · An Introduction to Short-Time Fourier Transform ... •Use of

4/7/2014

8

Fourier Transform - Limitations

• El Centro Earthquake Record and its Fourier transform

15

0 5 10 15 20 25 30 35-4

-3

-2

-1

0

1

2

3El Centro

Time

Acce

lera

tio

n

Included Signals: 10

0 5 10 15 20 25 30 35-0.2

-0.15

-0.1

-0.05

0

0.05

0.1

0.15El Centro - Components: 10

TimeA

cce

lera

tio

n

Fourier Transform - Limitations

• El Centro Earthquake Record and its Fourier transform

16

0 5 10 15 20 25 30 35-4

-3

-2

-1

0

1

2

3El Centro

Time

Acce

lera

tio

n

Included Signals: 50

0 5 10 15 20 25 30 35-1.5

-1

-0.5

0

0.5

1

1.5El Centro - Components: 50

Time

Acce

lera

tio

n

Page 9: An Introduction to Short-Time Fourier Transform (STFT)sharif.ir/~ahmadizadeh/courses/advstdyn/Short-Time Fourier... · An Introduction to Short-Time Fourier Transform ... •Use of

4/7/2014

9

Fourier Transform - Limitations

• El Centro Earthquake Record and its Fourier transform

17

0 5 10 15 20 25 30 35-4

-3

-2

-1

0

1

2

3El Centro

Time

Acce

lera

tio

n

Included Signals: 200

0 5 10 15 20 25 30 35-3

-2

-1

0

1

2

3El Centro - Components: 200

TimeA

cce

lera

tio

n

Fourier Transform - Limitations

• El Centro Earthquake Record and its Fourier transform

18

0 5 10 15 20 25 30 35-4

-3

-2

-1

0

1

2

3El Centro

Time

Acce

lera

tio

n

Included Signals: 800

0 5 10 15 20 25 30 35-4

-3

-2

-1

0

1

2

3El Centro - Components: 800

Time

Acce

lera

tio

n

Page 10: An Introduction to Short-Time Fourier Transform (STFT)sharif.ir/~ahmadizadeh/courses/advstdyn/Short-Time Fourier... · An Introduction to Short-Time Fourier Transform ... •Use of

4/7/2014

10

Short-Time Fourier Transform

• Basic Concept:

– Break up the signal in time domain to a number of signals of shorter duration, then transform each signal to frequency domain

• Requires fewer number of harmonics to regenerate the signal chunks

• Helps determine the time interval in which certain frequencies occur

19

Short-Time Fourier Transform

• Consider the first 3 seconds of the El Centro Record

20

0 0.5 1 1.5 2 2.5 3 3.5-4

-3

-2

-1

0

1

2

3El Centro

Time

Accele

ration

0 5 10 15 20 25 300

2

4

Am

plit

ude

Output

0 5 10 15 20 25 30-50

0

50

100

Frequency (Hz)

Phase

Page 11: An Introduction to Short-Time Fourier Transform (STFT)sharif.ir/~ahmadizadeh/courses/advstdyn/Short-Time Fourier... · An Introduction to Short-Time Fourier Transform ... •Use of

4/7/2014

11

Short-Time Fourier Transform

• Consider the first 3 seconds of the El Centro Record

21

0 0.5 1 1.5 2 2.5 3 3.5-4

-3

-2

-1

0

1

2

3El Centro

Time

Accele

ration

0 0.5 1 1.5 2 2.5 3 3.5-3

-2

-1

0

1

2

3El Centro - Components: 10

Time

Accele

ration

Included Signals: 10

Short-Time Fourier Transform

• Consider the first 3 seconds of the El Centro Record

22

0 0.5 1 1.5 2 2.5 3 3.5-4

-3

-2

-1

0

1

2

3El Centro

Time

Accele

ration

0 0.5 1 1.5 2 2.5 3 3.5-3

-2

-1

0

1

2

3El Centro - Components: 30

Time

Accele

ration

Included Signals: 30

Page 12: An Introduction to Short-Time Fourier Transform (STFT)sharif.ir/~ahmadizadeh/courses/advstdyn/Short-Time Fourier... · An Introduction to Short-Time Fourier Transform ... •Use of

4/7/2014

12

Short-Time Fourier Transform

• Consider the first 3 seconds of the El Centro Record

23

0 0.5 1 1.5 2 2.5 3 3.5-4

-3

-2

-1

0

1

2

3El Centro

Time

Accele

ration

0 0.5 1 1.5 2 2.5 3 3.5-4

-3

-2

-1

0

1

2

3El Centro - Components: 80

Time

Accele

ration

Included Signals: 80

Short-Time Fourier Transform

• Or consider the first chunk of non-stationary record

24

0 0.2 0.4 0.6 0.8 1-1

-0.5

0

0.5

13 Frequencies

Time (s)

Sig

nal

Knowing the location of the considered chunk in time and its frequency content, we can get an idea of the time each frequency exists.

Page 13: An Introduction to Short-Time Fourier Transform (STFT)sharif.ir/~ahmadizadeh/courses/advstdyn/Short-Time Fourier... · An Introduction to Short-Time Fourier Transform ... •Use of

4/7/2014

13

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-1

-0.5

0

0.5

1Non-Stationary

Time (s)

Sig

nal

Short-Time Fourier Transform

Need a local analysis scheme for a time-frequency representation (TFR).

Windowed F.T. or Short Time F.T. (STFT)

Segmenting the signal into narrow time intervals (i.e., narrow enough to be considered stationary).

Take the Fourier transform of each segment.

25

Short-Time Fourier Transform

• Steps:– Choose a window function of finite length

• A window function is a function that is multiplied by the signal to keep a certain portion of it

– Place the window on top of the signal at t=0

– Truncate the signal using this window

26

Page 14: An Introduction to Short-Time Fourier Transform (STFT)sharif.ir/~ahmadizadeh/courses/advstdyn/Short-Time Fourier... · An Introduction to Short-Time Fourier Transform ... •Use of

4/7/2014

14

Short-Time Fourier Transform

• Steps (continued)

– Compute the FT of the truncated signal, save results.

• For each time location where the window is centered, we obtain a different FT

– Each FT provides the spectral information of a separate time-slice of the signal, providing simultaneous time and frequency

information

– Incrementally slide the window to the right

– Repeat until window reaches the end of the signal

27

Short-Time Fourier Transform

• What is being Fourier-transformed:

28

0 0.2 0.4 0.6 0.8 1-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8Hann Windowed Non-Stationary Signal

Time (s)

Sig

nal

0 0.2 0.4 0.6 0.8 1-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8Hann Windowed Non-Stationary Signal

Time (s)

Sig

nal

0 0.2 0.4 0.6 0.8 1-1

-0.5

0

0.5

1Hann Windowed Non-Stationary Signal

Time (s)

Sig

nal

0 0.2 0.4 0.6 0.8 1-1

-0.5

0

0.5

1Hann Windowed Non-Stationary Signal

Time (s)

Sig

nal

0 0.2 0.4 0.6 0.8 1-1

-0.5

0

0.5

1Hann Windowed Non-Stationary Signal

Time (s)

Sig

nal

Window Length: 0.2s

0.1s 0.5s 0.9s

0.3s 0.7s

Page 15: An Introduction to Short-Time Fourier Transform (STFT)sharif.ir/~ahmadizadeh/courses/advstdyn/Short-Time Fourier... · An Introduction to Short-Time Fourier Transform ... •Use of

4/7/2014

15

0 20 40 60 80 1000

0.5

1

1.5

Am

plit

ude

Output

0 20 40 60 80 1000

10

20

Frequency (Hz)

Ph

ase

0 20 40 60 80 1000

0.5

1

1.5

Am

plit

ude

Output

0 20 40 60 80 100-2

0

2

4

Frequency (Hz)

Ph

ase

Short-Time Fourier Transform

• Fourier transforms of windowed signal:

29

0 20 40 60 80 1000

0.5

1

1.5

Am

plit

ude

Output

0 20 40 60 80 100-10

-5

0

5

Frequency (Hz)

Ph

ase

0 20 40 60 80 1000

0.5

1

Am

plit

ude

Output

0 20 40 60 80 100-300

-200

-100

0

Frequency (Hz)

Ph

ase

0 20 40 60 80 1000

0.5

1

Am

plit

ude

Output

0 20 40 60 80 1000

100

200

300

Frequency (Hz)

Ph

ase

0.1s 0.5s 0.9s

0.3s 0.7s

Short-Time Fourier Transform

• Now we can plot the spectra next to each other to generate a surface:

30

(Window) Time

Frequency

Amplitude

Page 16: An Introduction to Short-Time Fourier Transform (STFT)sharif.ir/~ahmadizadeh/courses/advstdyn/Short-Time Fourier... · An Introduction to Short-Time Fourier Transform ... •Use of

4/7/2014

16

Short-Time Fourier Transform

• Formulation:

– Continuous STFT

31

STFT ( ) , , ( ) i tx t X x t w t e dt

( )x t

w t Window function, commonly a Hann window or Gaussian window bell centered around zero

Time-domain signal to be transformed

Time (slow time; lower resolution than )

Frequency

t

,X A complex function representing the phase and magnitude of the signal over time and frequency (this is essentially the Fourier Transform of ) ( )x t w t

Ofte

n p

hase u

nw

rappin

g is

em

plo

yed a

long e

ither o

r both

the tim

e

axis

, τ, a

nd fre

quency a

xis

, ω, to

suppre

ss a

ny ju

mp d

iscontin

uity

of th

e p

hase re

sult o

f the S

TFT

Short-Time Fourier Transform

• Formulation:

– Discrete STFT

32

STFT , , ni t

n n n m

n

x m X m x w e

nx

m

nw Sequence of discretized window function

Sequence of discretized time-domain signal to be transformed

Time index

Frequency

,X m STFT of the time-domain sequence

Time discretized, frequency continuous; but if FFT is used, they both will be discrete.

Page 17: An Introduction to Short-Time Fourier Transform (STFT)sharif.ir/~ahmadizadeh/courses/advstdyn/Short-Time Fourier... · An Introduction to Short-Time Fourier Transform ... •Use of

4/7/2014

17

Short-Time Fourier Transform

• Inverse STFT

– The original signal can be recovered from the transform by the Inverse STFT. The most widely accepted way of inverting the STFT is by using the overlap-add (OLA) method, which also allows for modifications to the STFT complex spectrum.

• Calculating the Inverse STFT:

– First, it is required that the window function must be scaled such that the area underneath the window function is unity:

33

Short-Time Fourier Transform

• Calculating the Inverse STFT (Continued):

– It follows that:

– Hence:

– The continuous Fourier transform is:

– Substituting from above:

34

Page 18: An Introduction to Short-Time Fourier Transform (STFT)sharif.ir/~ahmadizadeh/courses/advstdyn/Short-Time Fourier... · An Introduction to Short-Time Fourier Transform ... •Use of

4/7/2014

18

Short-Time Fourier Transform

• Calculating the Inverse STFT (Continued):

– Swap the integration order:

– Since the inverse Fourier transform is:

– Then the time-domain signal can be recovered:

35

Short-Time Fourier Transform

• Calculating the Inverse STFT (Continued):

– Or:

– Alternatively, one can obtain windowed grain or waveletof x(t) as:

36

Page 19: An Introduction to Short-Time Fourier Transform (STFT)sharif.ir/~ahmadizadeh/courses/advstdyn/Short-Time Fourier... · An Introduction to Short-Time Fourier Transform ... •Use of

4/7/2014

19

Short-Time Fourier Transform

• Time and Frequency Resolution:

– The STFT has a fixed resolution

• The width of the windowing function relates to how the signal is represented

• It determines whether there is good frequency resolution (frequency components close together can be separated) or good time resolution (the time at which frequencies change).

• A wide window (wideband transform) gives better frequency resolution but poor time resolution.

• A narrower window (narrowband transform) gives good time resolution but poor frequency resolution.

37

Short-Time Fourier Transform

• Time and Frequency Resolution (Continued):

– That is, we cannot have good resolutions in both time and frequency.

38

Good time resolution, poor frequency resolution

Good frequency resolution, poor time resolution

Page 20: An Introduction to Short-Time Fourier Transform (STFT)sharif.ir/~ahmadizadeh/courses/advstdyn/Short-Time Fourier... · An Introduction to Short-Time Fourier Transform ... •Use of

4/7/2014

20

Short-Time Fourier Transform

• Time and Frequency Resolution (Continued):

– To explain this limitation, note that in Fourier transform:

• To increase the frequency resolution of the window the frequency spacing of the coefficients (sequence in frequency domain) needs to be reduced.

– Decreasing Nyquist (max) frequency (and keeping N constant) will cause the window size to increase — since there are now fewer samples per unit time.

– The other alternative is to increase N, but this again causes the window size to increase.

– So any attempt to increase the frequency resolution causes a larger window size and therefore a reduction in time resolution—and vice-versa.

39

Short-Time Fourier Transform

• Time and Frequency Resolution (Continued):

– Best simultaneous resolution of both is reached with a Gaussian window function. This STFT with some modifications for multi-resolution becomes the Morletwavelet transform.

– Window should be narrow enough to make sure that the portion of the signal falling within the window is stationary.

– Very narrow windows do not offer good localization in the frequency domain.

40

Page 21: An Introduction to Short-Time Fourier Transform (STFT)sharif.ir/~ahmadizadeh/courses/advstdyn/Short-Time Fourier... · An Introduction to Short-Time Fourier Transform ... •Use of

4/7/2014

21

Short-Time Fourier Transform

• Time and Frequency Resolution (Continued):

– Windowing Function infinitely long:

• STFT turns into FT, providing excellent frequency localization, but no time information.

– Windowing Function infinitely short:

• gives the time signal back, with a phase factor, providing excellent time localization but no frequency information.

41

, ( ) i tX x t e dt X

, ( ) (t ) ( )i t iX x t e dt x e

( ) 1w t

( ) ( )w t t

Short-Time Fourier Transform

• Heisenberg (Uncertainty) Principle:

42

1

4t f

Time resolution: How well two spikes in time can be separated from each other in the transform domain.

Frequency resolution:How well two spectral components can be separated from each other in the transform domain.

𝜟𝒕 𝒂𝒏𝒅 𝜟𝒇 𝒄𝒂𝒏𝒏𝒐𝒕 𝒃𝒆𝒎𝒂𝒅𝒆 𝒂𝒓𝒃𝒊𝒕𝒓𝒂𝒓𝒊𝒍𝒚 𝒔𝒎𝒂𝒍𝒍 !

Page 22: An Introduction to Short-Time Fourier Transform (STFT)sharif.ir/~ahmadizadeh/courses/advstdyn/Short-Time Fourier... · An Introduction to Short-Time Fourier Transform ... •Use of

4/7/2014

22

Short-Time Fourier Transform

• Heisenberg (Uncertainty) Principle (Continued):

– One cannot know the exact time-frequency representation of a signal.

– We cannot precisely know at what time instance a frequency component is located.

– We can only know what interval of frequencies are present in which time intervals.

43

Short-Time Fourier Transform

• Example:

– Chirp Signal (linear frequency variation 10-200 Hz)

44

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

-1

-0.5

0

0.5

1

Time (sec)

x(t

)

500 points spaced at 0.002 s, variable window sizes

Page 23: An Introduction to Short-Time Fourier Transform (STFT)sharif.ir/~ahmadizadeh/courses/advstdyn/Short-Time Fourier... · An Introduction to Short-Time Fourier Transform ... •Use of

4/7/2014

23

Short-Time Fourier Transform

• Example (Continued):

– Chirp Signal – Ordinary Fourier Transform

45

0 50 100 150 200 2500

0.2

0.4

0.6

0.8

Am

plit

ude

Output

0 50 100 150 200 250-500

-400

-300

-200

-100

0

Frequency (Hz)

Phase

Short-Time Fourier Transform

• Example (Continued):

– Chirp Signal – Window Size: 128 points

46

00.2

0.40.6

0.81

0

50

100

150

200

2500

5

10

15

20

Time (sec)

Window size = 128 Window type = Hann

Frequency (Hz)Time (sec)

Fre

qu

en

cy (

Hz)

Window size = 128 Window type = Hann

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

50

100

150

200

250

Page 24: An Introduction to Short-Time Fourier Transform (STFT)sharif.ir/~ahmadizadeh/courses/advstdyn/Short-Time Fourier... · An Introduction to Short-Time Fourier Transform ... •Use of

4/7/2014

24

00.2

0.40.6

0.81

0

50

100

150

200

2500

5

10

15

20

Time (sec)

Window size = 64 Window type = Hann

Frequency (Hz)Time (sec)

Fre

qu

en

cy (

Hz)

Window size = 64 Window type = Hann

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

50

100

150

200

250

Short-Time Fourier Transform

• Example (Continued):

– Chirp Signal – Window Size: 64 points

47

Time (sec)

Fre

qu

en

cy (

Hz)

Window size = 32 Window type = Hann

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

50

100

150

200

250

00.2

0.40.6

0.81

0

50

100

150

200

2500

5

10

15

20

Time (sec)

Window size = 32 Window type = Hann

Frequency (Hz)

Short-Time Fourier Transform

• Example (Continued):

– Chirp Signal – Window Size: 32 points

48

Page 25: An Introduction to Short-Time Fourier Transform (STFT)sharif.ir/~ahmadizadeh/courses/advstdyn/Short-Time Fourier... · An Introduction to Short-Time Fourier Transform ... •Use of

4/7/2014

25

Short-Time Fourier Transform

• Use of MATLAB:

– The MATLAB command to perform STFT is spectrogram:

– Spectrogram inputs:

• x: input signal (signal to be transformed)

• window function (discrete window at the same input rate)

• window overlap (in terms of number of points)

• sampling points for FFT (number of points used in FFT)

• sampling frequency (rate of sampling for the input signal and the window function)

– Spectrogram outputs: Transformed signal, frequencies and times.

49

[B, f, t] = spectrogram(x, window, noverlap, nfft, fs)

Short-Time Fourier Transform

• Applications:

– Signal processing of any non-stationary signal (audio signals, earthquake excitations, structural responses to ambient vibrations, …)

– In structural dynamics, STFT can be used to:

• Determine the dominant modes of vibration (and their shapes and frequencies) at any time interval

• Health monitoring and damage detection through the study of dominant frequencies

– e.g. a reduction in frequency is generally indicative of damages leading to softer structures

50

Page 26: An Introduction to Short-Time Fourier Transform (STFT)sharif.ir/~ahmadizadeh/courses/advstdyn/Short-Time Fourier... · An Introduction to Short-Time Fourier Transform ... •Use of

4/7/2014

26

0 10 20 30 40-0.04

-0.02

0

0.02

0.04

Time, s

Dis

pla

cem

ent, m

-0.02 -0.01 0 0.01 0.02-2

-1

0

1

2x 10

5

Displacement, mF

orc

e, N

0 10 20 30 400

0.5

1

1.5

2

2.5x 10

4

Time, s

Energ

y, N

-m

Internal

Input

0 10 20 30 400

0.2

0.4

0.6

0.8

1

Time, s

Num

ber

of Itera

tions

Short-Time Fourier Transform

• Applications:

– Damage Detection Example:

• 2-Story structure, natural frequencies 2.2 and 5.8 Hz

• Response simulated to El Centro record

• Linear Response

51

Short-Time Fourier Transform

• Applications:

– Damage Detection Example:

• 2-Story structure, natural frequencies 2.2 and 5.8 Hz

• Response simulated to El Centro record

• Nonlinear Response (by defining a yield displacement)

52

0 10 20 30 40-0.04

-0.02

0

0.02

0.04

Time, s

Dis

pla

cem

ent, m

-0.02 -0.01 0 0.01 0.02-2

-1

0

1

2x 10

5

Displacement, m

Forc

e, N

0 10 20 30 400

0.5

1

1.5

2

2.5x 10

4

Time, s

Energ

y, N

-m

Internal

Input

0 10 20 30 400

10

20

30

Time, s

Num

ber

of Itera

tions

Page 27: An Introduction to Short-Time Fourier Transform (STFT)sharif.ir/~ahmadizadeh/courses/advstdyn/Short-Time Fourier... · An Introduction to Short-Time Fourier Transform ... •Use of

4/7/2014

27

Short-Time Fourier Transform

• Applications:

– Damage Detection Example: Linear Response

53

0 5 10 15 20 25 30 35-0.02

-0.01

0

0.01

0.02

Time (sec)

x(t

)

Time (sec)

Fre

qu

en

cy (

Hz)

Window size = 2048 Window type = Chebyshev

0 5 10 15 20 25 300

2

4

6

8

10

Short-Time Fourier Transform

• Applications:

– Damage Detection Example: Nonlinear Response

54

Time (sec)

Fre

qu

en

cy (

Hz)

Window size = 2048 Window type = Chebyshev

0 5 10 15 20 25 300

2

4

6

8

10

0 5 10 15 20 25 30 35-0.02

-0.01

0

0.01

0.02

Time (sec)

x(t)