tmr7 - experimental methods in marine hydrodynamics … · fast fourier transform ... flow past a...

26
TMR7 - Experimental Methods in Marine Hydrodynamics Time Series Analysis Jos´ e P. Gallardo Canabes Department of Marine Technology Norwegian University of Science and Technology November 3, 2010 J. Gallardo C. (NTNU) Time Series Analysis November 3, 2010 1 / 26

Upload: dotuyen

Post on 29-Apr-2018

257 views

Category:

Documents


9 download

TRANSCRIPT

Page 1: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... Flow past a circular cylinder Frequency analysis of the vortex shedding ... Experimental Methods

TMR7 - Experimental Methods in MarineHydrodynamics

Time Series Analysis

Jose P. Gallardo Canabes

Department of Marine TechnologyNorwegian University of Science and Technology

November 3, 2010

J. Gallardo C. (NTNU) Time Series Analysis November 3, 2010 1 / 26

Page 2: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... Flow past a circular cylinder Frequency analysis of the vortex shedding ... Experimental Methods

Outline of the presentation

Motivation

Some theory

Examples

Applications in Matlab

J. Gallardo C. (NTNU) Time Series Analysis November 3, 2010 2 / 26

Page 3: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... Flow past a circular cylinder Frequency analysis of the vortex shedding ... Experimental Methods

Motivation

Time series are common in engineering applications

Visual inspection is not enough

Many tools are available for the analysis

J. Gallardo C. (NTNU) Time Series Analysis November 3, 2010 3 / 26

Page 4: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... Flow past a circular cylinder Frequency analysis of the vortex shedding ... Experimental Methods

Fourier Series

A periodic function can be decomposed into its harmonic componentsThe function is represented as an infinite Fourier series

f (t) = a0 +∞∑k=1

ak cos(2πkt

T) + bk sin(

2πkt

T) (1)

with the coefficients a0, ak and bk defined as

a0 =1

T

∫ T

0f (t)dt

ak =2

T

∫ T

0f (t) cos(

2πkt

T)dt

bk =2

T

∫ T

0f (t) sin(

2πkt

T)dt

J. Gallardo C. (NTNU) Time Series Analysis November 3, 2010 4 / 26

Page 5: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... Flow past a circular cylinder Frequency analysis of the vortex shedding ... Experimental Methods

Fourier Integral

When T →∞ the Fourier integral is obtained

f (t) =

∫ ∞0

[A(ω) cos(ωt) + B(ω) sin(ωt)]dω (2)

with

A(ω) =1

π

∫ ∞−∞

f (t) cos(ωt)dt

B(ω) =1

π

∫ ∞−∞

f (t) sin(ωt)dt

J. Gallardo C. (NTNU) Time Series Analysis November 3, 2010 5 / 26

Page 6: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... Flow past a circular cylinder Frequency analysis of the vortex shedding ... Experimental Methods

Fourier Transform

A more compact form of expressing the Fourier integral is

f (t) =1√2π

∫ ∞−∞

f (ω)e iωtdω (3)

With the the Fourier transform of f (t)

f (ω) =1√2π

∫ ∞−∞

f (t)e−iωtdt (4)

The Fourier transform converts a function of time into a function offrequency

J. Gallardo C. (NTNU) Time Series Analysis November 3, 2010 6 / 26

Page 7: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... Flow past a circular cylinder Frequency analysis of the vortex shedding ... Experimental Methods

Discrete Fourier Transform (DFT)

Typically the values of f (t) are sampled at equally spaced points

The DFT of a signal f with n components will be

fn =N−1∑k=0

fke−intk , n = 0, . . . ,N − 1 (5)

Expressed in matricial form f = Ff where F is a N × N matrix

DFT requires O(N2) operations

Fast Fourier transform (FFT) lowers this requirement toO(N) log2(N) operations!

J. Gallardo C. (NTNU) Time Series Analysis November 3, 2010 7 / 26

Page 8: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... Flow past a circular cylinder Frequency analysis of the vortex shedding ... Experimental Methods

Filtering of data

High-pass filter Removes low frequency componentsLow-pass filter Removes high frequency componentsBand-pass filter Select a frequency interval for filtering

J. Gallardo C. (NTNU) Time Series Analysis November 3, 2010 8 / 26

Page 9: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... Flow past a circular cylinder Frequency analysis of the vortex shedding ... Experimental Methods

Time Series Tools - Matlab

Opened by writing tstool in the command prompt

Import data

Plot the time series data

Select data subsets for analysis (filter)

Process the data (statistics)

Plot spectrum

Further analysis (power spectra) can be performed with built-in functionsof the Signal Processing Toolbox

J. Gallardo C. (NTNU) Time Series Analysis November 3, 2010 9 / 26

Page 10: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... Flow past a circular cylinder Frequency analysis of the vortex shedding ... Experimental Methods

Examples

1 Flow past a circular cylinder and determination of the dominant(Strouhal) frequency

2 Irregular waves

3 Example of response amplitude operator (RAO)

J. Gallardo C. (NTNU) Time Series Analysis November 3, 2010 10 / 26

Page 11: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... Flow past a circular cylinder Frequency analysis of the vortex shedding ... Experimental Methods

Example 1 - Flow past a circular cylinder

Flow past a circular cylinder at Re = 100

Unsteady, viscous and laminar flow

Strouhal number characterizes vortex shedding frequency

U∞

Boundary layer

Shear layerWake

J. Gallardo C. (NTNU) Time Series Analysis November 3, 2010 11 / 26

Page 12: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... Flow past a circular cylinder Frequency analysis of the vortex shedding ... Experimental Methods

Example 1 - Flow past a circular cylinder

Flow past a curved circular cylinder at Re = 100

Unsteady, viscous laminar flow

Frequency analysis of the velocity trace in the cross-stream direction

J. Gallardo C. (NTNU) Time Series Analysis November 3, 2010 12 / 26

Page 13: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... Flow past a circular cylinder Frequency analysis of the vortex shedding ... Experimental Methods

Example 1 - Flow past a circular cylinder

Flow past a curved circular cylinder at Re = 500

Transition to turbulence

One dominant frequency, and secondary instabilities

J. Gallardo C. (NTNU) Time Series Analysis November 3, 2010 13 / 26

Page 14: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... Flow past a circular cylinder Frequency analysis of the vortex shedding ... Experimental Methods

Example 1 - Flow past a circular cylinder

Frequency analysis of the vortex shedding

One shedding frequency, St = 0.176 at Re = 100

St = 0.225 at Re = 500

J. Gallardo C. (NTNU) Time Series Analysis November 3, 2010 14 / 26

Page 15: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... Flow past a circular cylinder Frequency analysis of the vortex shedding ... Experimental Methods

Example 2 - Irregular long-crested waves

Linear theory for the statistical descriptionWave elevation composed of a large number of wave components

ζ(x , t) =N∑j=1

ζaj sin(ωj t − kjx + ε)

Relation between the discrete amplitude and the wave spectrum for ωj

1

2ζ2aj = S(ωj)∆ω

0

time

ζ(t)

Frequency

S(ω

)

J. Gallardo C. (NTNU) Time Series Analysis November 3, 2010 15 / 26

Page 16: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... Flow past a circular cylinder Frequency analysis of the vortex shedding ... Experimental Methods

Example 2 - Irregular long-crested waves

Basic idea with this example is to generate time series of irregular waveswith a Pierson-Moskowitz spectrum, and generate the spectrum again withthe Matlab function pwelch

Generate the data from the script IrregWave.m (requires functionPMspectrum.m)

Calculate the sampling frequency from the time series: writeFs=1./dt in the command prompt

Use the pwelch function to get the values of spectral density andfrequency: [P,F] = pwelch(z,[],[],[],2*pi*Fs)

Plot the estimated spectrum: plot(F,P)

J. Gallardo C. (NTNU) Time Series Analysis November 3, 2010 16 / 26

Page 17: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... Flow past a circular cylinder Frequency analysis of the vortex shedding ... Experimental Methods

Example 2 - Irregular long-crested waves

Values of the parameters are T1 = 10.13 s and H1/3 = 2.52 m

0 0.5 1 1.5 2 2.5 3 3.5 40

0.5

1

1.5Plot of the Pierson−Moskowitz Spectrum

ω [rad/s]

S(ω

) [m

2 /s]

T1 = 10.13 [s] and H1/3 = 2.52 [m]

0 50 100 150 200 250 300−2

−1.5

−1

−0.5

0

0.5

1

1.5

2

time [s]

ζ(t)

[m]

Irregular wave

0 50 100 150 200 250 300−2

−1.5

−1

−0.5

0

0.5

1

1.5

2

time [s]

ζ(t)

[m]

Irregular wave

0 0.5 1 1.5 2 2.5 3 3.5 40

0.5

1

1.5Estimated spectrum using the simulated time series

Frequency [rad/s]

S(ω

) [m

2 s]

How does the spectral estimation depends on length of the time series?Sampling frequency?

J. Gallardo C. (NTNU) Time Series Analysis November 3, 2010 17 / 26

Page 18: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... Flow past a circular cylinder Frequency analysis of the vortex shedding ... Experimental Methods

Example 3 - Response Amplitude Operator (RAO)

Given a sea state defined by the spectrum Sζ(ω), find the responsespectrum Sη(ω)

The response amplitude for a certain frequency can be found by thetransfer function Hη(ω)

Conside the state at the frequency ωj

η0j = Hη(ωj)ζaj

1

2η2

0j︸︷︷︸=Sη(ωj )∆ω

= H2η (ωj)

1

2ζ2aj︸︷︷︸

=Sζ(ωj )∆ω

Sη(ω) = H2η (ω)Sζ(ω)

J. Gallardo C. (NTNU) Time Series Analysis November 3, 2010 18 / 26

Page 19: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... Flow past a circular cylinder Frequency analysis of the vortex shedding ... Experimental Methods

Example 3 - RAO with regular waves

Load data: write regw1 = load(regw1.asc) in the commandprompt

Open tstool application: write tstool in the command prompt

J. Gallardo C. (NTNU) Time Series Analysis November 3, 2010 19 / 26

Page 20: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... Flow past a circular cylinder Frequency analysis of the vortex shedding ... Experimental Methods

Example 3 - RAO with regular waves

Step1: Import the data regw1.asc : File → Import from workspace →Array data

J. Gallardo C. (NTNU) Time Series Analysis November 3, 2010 20 / 26

Page 21: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... Flow past a circular cylinder Frequency analysis of the vortex shedding ... Experimental Methods

Example 3 - RAO with regular waves

Step 2: Choose the variable regw1 and specify the time vector in thecurrent variable (first column)

Step3: Press next, choose create several time series and press Finish

J. Gallardo C. (NTNU) Time Series Analysis November 3, 2010 21 / 26

Page 22: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... Flow past a circular cylinder Frequency analysis of the vortex shedding ... Experimental Methods

Example 3 - RAO with regular waves

The time series names can be renamed, rename regw15 as AccCGand regw17 as AccCG

Plot the time series to see how they look (drag to the folder TimePlots)

Choose the data of interest: Tools → Select data

With the right click over the selected data choose Keep observations

J. Gallardo C. (NTNU) Time Series Analysis November 3, 2010 22 / 26

Page 23: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... Flow past a circular cylinder Frequency analysis of the vortex shedding ... Experimental Methods

Example 3 - RAO with regular waves

Spectral plots can also be obtained be dragging the time series to thefolder Spectral Plots

High and low frequency components can be removed using the plotby selecting frequency intervals

Right-click over the selected frequency intervals and choose Pass

J. Gallardo C. (NTNU) Time Series Analysis November 3, 2010 23 / 26

Page 24: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... Flow past a circular cylinder Frequency analysis of the vortex shedding ... Experimental Methods

Example 3 - RAO with regular waves

The variables are exported to the workspace with class timeseries

To get the values as arrays write in the command prompt:time=Wave.time, WaveHeight=Wave.DataandResponse=AccCG.Data

Sampling frequency: Fs=1/(time(2)-time(1))

Spectral density values: [WaveSpectrum,fw] =

pwelch(WaveHeight,[],[],[],2*pi*Fs)and[ResponseSpectrum,fr] =

pwelch(Response,[],[],[],2*pi*Fs)

RAO: RAO=sqrt(ResponseSpectrum./WaveSpectrum)

J. Gallardo C. (NTNU) Time Series Analysis November 3, 2010 24 / 26

Page 25: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... Flow past a circular cylinder Frequency analysis of the vortex shedding ... Experimental Methods

Example 3 - RAO with regular waves

Plot spectral density and RAO

0 5 10 15 20 250

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1x 10

−4 Spectral Density plot

Frequency, [rad/s]

S

Wave height [m2s]

Response [m2/s3]

0 5 10 15 20 25 300

1

2

3

4

5

6

7

8

Frequency [rad/s]

RA

O[(

m/s

2 )/(m

)]

J. Gallardo C. (NTNU) Time Series Analysis November 3, 2010 25 / 26

Page 26: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... Flow past a circular cylinder Frequency analysis of the vortex shedding ... Experimental Methods

References

1 O. M. Faltinsen. Sea Loads on Ships and Offshore Structures,Cambridge Ocean Technology Series, 1990.

2 C. M. Larsen & W. Lian. TMR 4180 Marine Dynamics, Departmentof Marine Technology NTNU, 2009.

3 D. E. Newland. An Introduction to Random Vibrations, Spectral andWavelet Analysis, Longman Scientific & Technical, 1993.

J. Gallardo C. (NTNU) Time Series Analysis November 3, 2010 26 / 26