59
TMR7 - Experimental Methods in Marine Hydrodynamics Time Series Analysis Jos´ e P. Gallardo Canabes Department of Marine Technology Norwegian University of Science and Technology September 7, 2011 J. Gallardo C. (NTNU) Time Series Analysis September 7, 2011 1 / 32

TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

  • Upload
    buidat

  • View
    241

  • Download
    10

Embed Size (px)

Citation preview

Page 1: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

TMR7 - Experimental Methods in MarineHydrodynamics

Time Series Analysis

Jose P. Gallardo Canabes

Department of Marine TechnologyNorwegian University of Science and Technology

September 7, 2011

J. Gallardo C. (NTNU) Time Series Analysis September 7, 2011 1 / 32

Page 2: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

Outline of the presentation

1 Motivation

2 Background information

3 MATLAB for data analysis

4 Examples

J. Gallardo C. (NTNU) Time Series Analysis September 7, 2011 2 / 32

Page 3: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

Outline of the presentation

1 Motivation

2 Background information

3 MATLAB for data analysis

4 Examples

J. Gallardo C. (NTNU) Time Series Analysis September 7, 2011 2 / 32

Page 4: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

Outline of the presentation

1 Motivation

2 Background information

3 MATLAB for data analysis

4 Examples

J. Gallardo C. (NTNU) Time Series Analysis September 7, 2011 2 / 32

Page 5: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

Outline of the presentation

1 Motivation

2 Background information

3 MATLAB for data analysis

4 Examples

J. Gallardo C. (NTNU) Time Series Analysis September 7, 2011 2 / 32

Page 6: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

Table of Contents

1 Motivation

2 Background information

3 MATLAB for data analysis

4 Examples

J. Gallardo C. (NTNU) Time Series Analysis September 7, 2011 3 / 32

Page 7: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

Motivation

Time series are common in science and engineering applications

Planetary motion

Periodic and predictable. . . to somedegree

Irregular waves

Random and difficult to predict

J. Gallardo C. (NTNU) Time Series Analysis September 7, 2011 4 / 32

Page 8: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

Motivation

Time series are common in science and engineering applications

Planetary motion

Periodic and predictable. . . to somedegree

Irregular waves

Random and difficult to predict

J. Gallardo C. (NTNU) Time Series Analysis September 7, 2011 4 / 32

Page 9: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

Motivation

Time series are common in science and engineering applications

Planetary motion

Periodic and predictable. . . to somedegree

Irregular waves

Random and difficult to predict

J. Gallardo C. (NTNU) Time Series Analysis September 7, 2011 4 / 32

Page 10: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

Motivation

Visual inspection is not enough

0

time

ζ(t)

Many tools are available for the analysis

J. Gallardo C. (NTNU) Time Series Analysis September 7, 2011 5 / 32

Page 11: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

Motivation

Visual inspection is not enough

0

time

ζ(t)

Many tools are available for the analysis

J. Gallardo C. (NTNU) Time Series Analysis September 7, 2011 5 / 32

Page 12: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

Motivation

Visual inspection is not enough

0

time

ζ(t)

Many tools are available for the analysis

J. Gallardo C. (NTNU) Time Series Analysis September 7, 2011 5 / 32

Page 13: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

Motivation

Visual inspection is not enough

0

time

ζ(t)

Many tools are available for the analysis

J. Gallardo C. (NTNU) Time Series Analysis September 7, 2011 5 / 32

Page 14: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

Table of Contents

1 Motivation

2 Background information

3 MATLAB for data analysis

4 Examples

J. Gallardo C. (NTNU) Time Series Analysis September 7, 2011 6 / 32

Page 15: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

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 September 7, 2011 7 / 32

Page 16: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

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 September 7, 2011 7 / 32

Page 17: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

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 September 7, 2011 8 / 32

Page 18: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

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 September 7, 2011 9 / 32

Page 19: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

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 September 7, 2011 9 / 32

Page 20: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

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 September 7, 2011 9 / 32

Page 21: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

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 September 7, 2011 10 / 32

Page 22: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

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 September 7, 2011 10 / 32

Page 23: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

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 September 7, 2011 10 / 32

Page 24: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

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 September 7, 2011 10 / 32

Page 25: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

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 September 7, 2011 10 / 32

Page 26: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

Table of Contents

1 Motivation

2 Background information

3 MATLAB for data analysis

4 Examples

J. Gallardo C. (NTNU) Time Series Analysis September 7, 2011 11 / 32

Page 27: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

MATLAB

Fast and efficient algorithms

Relatively easy to learn and write scripts (MATLAB editor)

Several options for visualization of data

Computations on large datasets

Specific applications (MATLAB toolbox)

J. Gallardo C. (NTNU) Time Series Analysis September 7, 2011 12 / 32

Page 28: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

MATLAB

Fast and efficient algorithms

Relatively easy to learn and write scripts (MATLAB editor)

Several options for visualization of data

Computations on large datasets

Specific applications (MATLAB toolbox)

J. Gallardo C. (NTNU) Time Series Analysis September 7, 2011 12 / 32

Page 29: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

MATLAB

Fast and efficient algorithms

Relatively easy to learn and write scripts (MATLAB editor)

Several options for visualization of data

Computations on large datasets

Specific applications (MATLAB toolbox)

J. Gallardo C. (NTNU) Time Series Analysis September 7, 2011 12 / 32

Page 30: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

MATLAB

Fast and efficient algorithms

Relatively easy to learn and write scripts (MATLAB editor)

Several options for visualization of data

Computations on large datasets

Specific applications (MATLAB toolbox)

J. Gallardo C. (NTNU) Time Series Analysis September 7, 2011 12 / 32

Page 31: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

MATLAB

Fast and efficient algorithms

Relatively easy to learn and write scripts (MATLAB editor)

Several options for visualization of data

Computations on large datasets

Specific applications (MATLAB toolbox)

J. Gallardo C. (NTNU) Time Series Analysis September 7, 2011 12 / 32

Page 32: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

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 September 7, 2011 13 / 32

Page 33: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

Table of Contents

1 Motivation

2 Background information

3 MATLAB for data analysis

4 Examples

J. Gallardo C. (NTNU) Time Series Analysis September 7, 2011 14 / 32

Page 34: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

Examples

1 Simple mathematical functions

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

3 Irregular waves

4 Example of response amplitude operator (RAO)

J. Gallardo C. (NTNU) Time Series Analysis September 7, 2011 15 / 32

Page 35: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

Examples

1 Simple mathematical functions

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

3 Irregular waves

4 Example of response amplitude operator (RAO)

J. Gallardo C. (NTNU) Time Series Analysis September 7, 2011 15 / 32

Page 36: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

Examples

1 Simple mathematical functions

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

3 Irregular waves

4 Example of response amplitude operator (RAO)

J. Gallardo C. (NTNU) Time Series Analysis September 7, 2011 15 / 32

Page 37: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

Examples

1 Simple mathematical functions

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

3 Irregular waves

4 Example of response amplitude operator (RAO)

J. Gallardo C. (NTNU) Time Series Analysis September 7, 2011 15 / 32

Page 38: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

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 September 7, 2011 16 / 32

Page 39: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

Example 1 - Simple functions

Beat frequency: interference between two frequencies f1and f2

0 1 2 3 4 5

−0.2

−0.1

0

0.1

0.2

0.3

f1+f

2

t*

Function with random noise

0 2 4 6 8 10−2

−1

0

1

2

J. Gallardo C. (NTNU) Time Series Analysis September 7, 2011 17 / 32

Page 40: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

Example 1 - Simple functions

Beat frequency: interference between two frequencies f1and f2

0 1 2 3 4 5

−0.2

−0.1

0

0.1

0.2

0.3

f1+f

2

t*

Function with random noise

0 2 4 6 8 10−2

−1

0

1

2

J. Gallardo C. (NTNU) Time Series Analysis September 7, 2011 17 / 32

Page 41: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

Example 2 - Flow past a circular cylinder

Flow past a circular cylinder at different Reynolds numbers

Unsteady, viscous and laminar or turbulent flow

Strouhal number characterizes vortex shedding frequency

U∞

Boundary layer

Shear layerWake

J. Gallardo C. (NTNU) Time Series Analysis September 7, 2011 18 / 32

Page 42: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

Example 2 - 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 September 7, 2011 19 / 32

Page 43: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

Example 2 - 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 September 7, 2011 19 / 32

Page 44: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

Example 2 - 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 September 7, 2011 20 / 32

Page 45: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

Example 2 - 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 September 7, 2011 20 / 32

Page 46: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

Example 2 - 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 September 7, 2011 21 / 32

Page 47: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

Example 2 - 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 September 7, 2011 21 / 32

Page 48: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

Example 2 - 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 September 7, 2011 21 / 32

Page 49: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

Example 3 - Irregular long-crested waves

Linear theory for the statistical description

Wave 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 September 7, 2011 22 / 32

Page 50: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

Example 3 - 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 September 7, 2011 23 / 32

Page 51: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

Example 3 - 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 September 7, 2011 24 / 32

Page 52: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

Example 4 - 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 September 7, 2011 25 / 32

Page 53: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

Example 4 - RAO with irregular waves

Run the MATLAB script GetData.m to retrieve and plot data fromthe file test3004.mat

Open tstool application: write tstool in the commandprompt

J. Gallardo C. (NTNU) Time Series Analysis September 7, 2011 26 / 32

Page 54: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

Example 4 - RAO with irregular waves

Step1: Import the data wave, waveCarriage and heave → Import fromworkspace → Array data

J. Gallardo C. (NTNU) Time Series Analysis September 7, 2011 27 / 32

Page 55: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

Example 3 - RAO with regular waves

Step 2: Choose the variable wave and specify the time vector inanother variable (press Select Variable tab and choose time)Step3: Press next, rename the time series to FilteredWave and pressFinish

J. Gallardo C. (NTNU) Time Series Analysis September 7, 2011 28 / 32

Page 56: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

Example 4 - RAO with irregular waves

Plot the time series to see how they look (drag to the folder TimePlots); the data is already pre-processedSpectral plots can be obtained be dragging the time series to thefolder Spectral PlotsHigh and low frequency components can be removed using the plotby selecting frequency intervalsRight-click over the selected frequency intervals and choose Pass

J. Gallardo C. (NTNU) Time Series Analysis September 7, 2011 29 / 32

Page 57: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

Example 4 - RAO with irregular waves

Repeat the steps above for waveCarriage and heave (remember torename to FilteredWaveCarriage and FilteredHeave)

The variables are exported to the workspace with class timeseries

In the script RAOirreg.m the data is retrieved aszeta=FilteredWave.Data , zeta c=FilteredWaveCarriage.Data

and eta 3=FilteredHeave.Data

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

Spectral density values: [WaveSpectrum,fw] =

pwelch(zeta,[],[],[],2*pi*Fs),[EncounteredWaveSpectrum,fe] =

pwelch(zeta c,[],[],[],2*pi*Fs)and [ResponseSpectrum,fr]

= pwelch(eta 3,[],[],[],2*pi*Fs)

RAO:RAO=sqrt(ResponseSpectrum./EncounteredWaveSpectrum)

J. Gallardo C. (NTNU) Time Series Analysis September 7, 2011 30 / 32

Page 58: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

Example 4 - RAO with irregular waves

Plot spectral density and RAO

0 1 2 3 4 50

1

2

3

4

5

6Spectral Density plot

Frequency, [rad/s]

S(ω

)

Wave [m2s]

Encounter Wave [m2s]

Heave Response [m2s]

0 1 2 3 4 50

0.5

1

1.5

Frequency [rad/s]

RA

O [m

/m]

J. Gallardo C. (NTNU) Time Series Analysis September 7, 2011 31 / 32

Page 59: TMR7 - Experimental Methods in Marine Hydrodynamics … · Fast Fourier transform ... 2 Flow past a circular cylinder and determination of the dominant ... Experimental Methods in

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 September 7, 2011 32 / 32