<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
		<link type="text/css" rel="stylesheet" href="doxygen.css"/>
		<link type="text/css" rel="stylesheet" href="tabs.css"/>
	</head>
	<body>
	<div>
<!-- Generated by Doxygen 1.8.5 -->
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">Generation of time series </div>  </div>
</div><!--header-->
<div class="contents">
<div class="toc"><h3>Table of Contents</h3>
<ul><li class="level1"><a href="#tm_generation_superposition">Superposition of harmonic components</a><ul><li class="level2"><a href="#tm_generation_superposition_fast">Fast Fourier transform (FFT)</a></li>
<li class="level2"><a href="#tm_generation_superposition_summation">Summation of harmonic components in the time domain</a></li>
<li class="level2"><a href="#tm_generation_superposition_state">State-space model driven by white noise</a></li>
</ul>
</li>
<li class="level1"><a href="#tm_generation_wind">Wind sampling</a></li>
<li class="level1"><a href="#tm_generation_sampling">Sampling of waves and first-order responses</a></li>
<li class="level1"><a href="#tm_generation_second">Second-order time series</a><ul><li class="level2"><a href="#tm_generation_second_quadratic">Quadratic filter</a></li>
<li class="level2"><a href="#tm_generation_second_double">Double sum of harmonic components</a></li>
<li class="level2"><a href="#tm_generation_second_simplified">Simplified model (Newman)</a></li>
<li class="level2"><a href="#tm_generation_second_short">Short-crested waves</a></li>
<li class="level2"><a href="#tm_generation_second_low">Low-pass filtering</a></li>
</ul>
</li>
</ul>
</div>
<div class="textblock"><p><a class="anchor" id="generation"></a></p>
<p>This chapter describes different ways of generating realizations (samples) of Gaussian stochastic processes for which the mean values and the variance spectra are known. These are as follows:</p>
<ul>
<li>wind gust.</li>
<li>wave elevation, particle velocity and acceleration.</li>
<li><img class="formulaInl" alt="$ 1^{\mathrm{st}} $" src="form_763.png"/> order wave responses such as <img class="formulaInl" alt="$ 1^{\mathrm{st} } $" src="form_764.png"/> order excitations, <img class="formulaInl" alt="$ 1^{\mathrm{st} } $" src="form_764.png"/> order wave-induced motions or <img class="formulaInl" alt="$ 1^{\mathrm{st} } $" src="form_764.png"/> order diffracted wave kinematics.</li>
<li><img class="formulaInl" alt="$ 2^{\mathrm{nd} } $" src="form_765.png"/> order wave responses such as full or simplified second order wave forces.</li>
</ul>
<p>The time series are generated by superposition of harmonic components, with uniformly distributed phases by means of pre-generation by the Fast Fourier Transform (FFT), by time domain summation of the harmonic components or by a state-space model (wind gust) driven by white noise.</p>
<h1><a class="anchor" id="tm_generation_superposition"></a>
Superposition of harmonic components</h1>
<p><a class="anchor" id="contrib_var_hc"></a></p>
<div class="image">
<img src="image649.png" alt="image649.png"/>
<div class="caption">
The contribution to the variance of each harmonic component is set equal to the spectrums contribution in the area</div></div>
<p>The time series are generated by discretizing the variance spectrum into a finite number of finite-valued harmonic components, and by sampling phases from a uniform distribution over <img class="formulaInl" alt="$ \left[ 0, 2\pi \right] $" src="form_766.png"/> , see <a class="el" href="a00010.html#tm-eq-5-1">Eq. (5.1)</a>. The time series of the sample is written:</p>
<p><a class="anchor" id="tm-eq-5-1"></a> </p>
<p class="formulaDsp">
<img class="formulaDsp" alt="\[ x(t) = \sum_{k=1}^{N}\, x_k \cos \left( \omega t + \phi_k \right) \tag{5.1} \]" src="form_767.png"/>
</p>
<p>where <img class="formulaInl" alt="$ \phi_k $" src="form_768.png"/> is the sampled phase. Processes that are linear transformations of <img class="formulaInl" alt="$ x(t) $" src="form_769.png"/> are written:</p>
<p class="formulaDsp">
<img class="formulaDsp" alt="\[ y(t) = \sum_{k=1}^{N}\, \frac{y_k}{x_k} x_k \cos(\omega t + \phi_k + \phi_y) \tag{5.2} \]" src="form_770.png"/>
</p>
<p>where:</p>
 
<table width="800">
<tr> <td align="left" width = "9%">\( \displaystyle \frac{y_{k}}{x_k} \) </td><td align="left">response amplitude operator
</td></tr>
<tr> <td align="left">\( \phi_y \) </td><td align="left">phase angle </td></tr>
</table>
<p>The definitions of phase angles are described in Chapter <a class="el" href="a00006.html#tm_environment">Environment</a>.</p>
<p>Time series generated in this way will repeat themselves with a period <img class="formulaInl" alt="$ T_p = 2\pi/\Delta\omega_{k\mathrm{min} } $" src="form_771.png"/> , where <img class="formulaInl" alt="$ \omega_{k\mathrm{min} } $" src="form_772.png"/> is the smallest frequency increment.</p>
<p>Inverting a left truncated square root generates the random numbers used for phase sampling. The pseudo-random numbers are generated within a specified interval.</p>
<h2><a class="anchor" id="tm_generation_superposition_fast"></a>
Fast Fourier transform (FFT)</h2>
<p>Normally, the addition of harmonic components to obtain time series is done by the Fast Fourier transform (FFT) which requires equal frequency spacing and a number of frequencies (or number of time samples) to be <img class="formulaInl" alt="$ N=2^r $" src="form_773.png"/> where <img class="formulaInl" alt="$ r $" src="form_738.png"/> is an integer number.</p>
<p>A Cooley-Tukey Fourier transform algorithm is used to compute FFT in SIMO.</p>
<p>The relations between time increment, <img class="formulaInl" alt="$ \Delta t $" src="form_774.png"/> , the number of time steps, <img class="formulaInl" alt="$ N_t $" src="form_775.png"/> , number of positive frequency components, <img class="formulaInl" alt="$ N_{\omega}^+ $" src="form_776.png"/> , and the frequency increment is:</p>
<p class="formulaDsp">
<img class="formulaDsp" alt="\[ \Delta \omega = \frac{2\pi}{N_t\Delta t} \tag{5.3} \]" src="form_777.png"/>
</p>
<p class="formulaDsp">
<img class="formulaDsp" alt="\[ N_{\omega}^+ = \frac{N_t}{2} +1 \tag{5.4} \]" src="form_778.png"/>
</p>
<p>Thus, the duration of the time series is limited to:</p>
<p class="formulaDsp">
<img class="formulaDsp" alt="\[ T_p = N_t\Delta t = \frac{2\pi}{\Delta \omega} \tag{5.5} \]" src="form_779.png"/>
</p>
<p>When using the FFT algorithm, the time series of excitations or linear responses must be calculated for predefined positions and vessel headings. It is not possible to utilise the very high efficiency of the FFT if positions must be modified by for example calculating for short periods and then updating the position. In this case, different strategies are possible:</p>
<ul>
<li>Calculation with traditional addition of time-domain sine or cosine functions for every harmonic component at the wanted position and time increment. This is described in Section <a class="el" href="a00010.html#tm_generation_superposition_summation">Summation of harmonic components in the time domain</a>.</li>
<li>Introduction of a linear frequency-dependent phase filter (not implemented).</li>
<li>Calculation of time series by FFT in a grid of positions and directions and interpolation during the simulation to obtain values at the wanted position and time increment (not implemented).</li>
</ul>
<h2><a class="anchor" id="tm_generation_superposition_summation"></a>
Summation of harmonic components in the time domain</h2>
<p>Calculation of wave responses for each time step during the simulation can be performed by summation of harmonic components (sine/cosine series). The calculation is made for the instantaneous locations of each body (and for slender elements: each section). This will normally give more correct wave kinematics and loads for each body, irrespective of changes in the (x,y,z)-position. This method will enable simulation of horizontal and vertical transport and also, by some stretching, enable changes in the sea state with time. The computing time will be longer than for an FFT pre-generation, especially for long time series.</p>
<p>Due to these time-consuming calculations, a combination of pre-generated time series and cosine series in the time domain is made possible. For such a combination it is also possible to ensure that the same realization of wave components is used for both options for wave response calculation.</p>
<p>Time series from simulations with system changes including position changes may be in conflict with the assumption of stationary (ergodic) Gaussian processes. Hence, the analysis of these time series and their resulting responses should be handled with care.</p>
<p>As stated above, the time series generated in this way will repeat themselves with a period <img class="formulaInl" alt="$ T_p = 2\pi / \Delta \omega_{k\mathrm{min}} $" src="form_780.png"/> . For a user-given number of wave components for wind sea and swell, it is important that the number of components is sufficiently high to avoid a repeating wave response time series for the longest duration of the simulated operation that is close to stationary.</p>
<p>The usual methods of estimating extreme response are not applicable for processes with a moving average or which includes transients. Thus the standard deviation and estimates of extremes by use of the Rayleigh distribution should not be calculated for a body that i.e. is lowered through the splash zone or is lifted or landed during the simulation. Problems with repeating time series of wave kinematics, as described above, will thus not be a relevant subject in many of these cases.</p>
<p>Stochastic amplitudes may be specified to be used for time domain wave response generation. This is another conflict with the assumption of ergodic processes, and analyses will often require simulations with multiple wave realizations in order to be able to give reliable extreme value estimates.</p>
<h2><a class="anchor" id="tm_generation_superposition_state"></a>
State-space model driven by white noise</h2>
<p>Fluctuating wind (gust) can be modelled as a state space model driven by white noise of unit density, <a class="el" href="a00014.html#bibliography">Kaasen [33]</a>. The first step is to approximate the given wind spectrum in non-dimensional form by a rational transfer function, so that</p>
<p class="formulaDsp">
<img class="formulaDsp" alt="\[ S'(f') = |H'(jf')|^2, \quad j = \sqrt{-1} \tag{5.6} \]" src="form_781.png"/>
</p>
<p>where the non-dimensional transfer function is on the form:</p>
<p><a class="anchor" id="tm-eq-5-7"></a> </p>
<p class="formulaDsp">
<img class="formulaDsp" alt="\[ H'(p') = \frac{b'_0 + b'_1 p' + \cdots + b'_m p'^m}{a'_0 + a'_1 p' + \cdots + a'_n p'^n} \tag{5.7} \]" src="form_782.png"/>
</p>
<p>where <img class="formulaInl" alt="$ p' = jf' $" src="form_783.png"/></p>
<p>The two scaling factors, one for frequency <img class="formulaInl" alt="$ (\lambda_f) $" src="form_784.png"/> , and one for spectral density <img class="formulaInl" alt="$ (\lambda_s) $" src="form_785.png"/> are:</p>
<p class="formulaDsp">
<img class="formulaDsp" alt="\[ f = \lambda_f f', \ S=\lambda_s S' \tag{5.8} \]" src="form_786.png"/>
</p>
<p>The next step is to estimate the model parameters by iterative least squares fitting of the rational spectrum functions to the given spectrum and deriving transfer functions and hence state space models from these.</p>
<p>For frequencies approaching infinity, the spectral density functions follow <img class="formulaInl" alt="$ \mathrm{const}\cdot f^{-5/3} $" src="form_787.png"/>. By choosing <img class="formulaInl" alt="$ n=m+1 $" src="form_788.png"/> in <a class="el" href="a00010.html#tm-eq-5-7">Eq. (5.7)</a> , the fitted spectra will decline as <img class="formulaInl" alt="$ \mathrm{const} \cdot f^{-2} $" src="form_789.png"/> towards high frequencies, i.e. slightly higher than the given spectra.</p>
<p>The dimensionless coefficients were found by least squares fitting of each spectrum for 100 dimensionless frequencies over an exponential frequency range from <img class="formulaInl" alt="$ f = 0.1 $" src="form_790.png"/> to <img class="formulaInl" alt="$ f = 10 $" src="form_791.png"/> .</p>
<p>For the Davenport and Harris spectra it was found that satisfactory transfer functions could be obtained with <img class="formulaInl" alt="$ 2^{\mathrm{nd} } $" src="form_765.png"/> -order models. For the ISO 19901-1 (NPD) spectrum a <img class="formulaInl" alt="$ 3^{\mathrm{rd} } $" src="form_792.png"/> -order model was required. The coefficients for these spectra are given in Section <a class="el" href="a00006.html#tm_environment_wind">Wind</a> in the Chapter <a class="el" href="a00006.html#tm_environment">Environment</a>.</p>
<p>To obtain coefficients for a given set of spectrum parameters, the following scaling factors for the model coefficients can be derived from the scaling factors  and :</p>
<p class="formulaDsp">
<img class="formulaDsp" alt="\[ \begin{array}{lll} a_i &amp;= (2\pi\lambda_f)^{n-i}a'_i, &amp;i=0, \cdots ,n \\ \\ b_i &amp;= (2\pi\lambda_f)^{m-i} \sqrt{\displaystyle \frac{\lambda_s}{2\pi} }b'_i, &amp;i=0, \cdots ,m \end{array} \tag{5.9} \]" src="form_793.png"/>
</p>
<p>The state space model is written:</p>
<p class="formulaDsp">
<img class="formulaDsp" alt="\[ \boldsymbol{\dot x} = \boldsymbol{Ax} + \boldsymbol{B}\zeta \tag{5.10} \]" src="form_794.png"/>
</p>
<p>Here, <img class="formulaInl" alt="$ \boldsymbol{x} $" src="form_795.png"/> is the <img class="formulaInl" alt="$ n $" src="form_440.png"/> -element state vector, and <img class="formulaInl" alt="$ \boldsymbol{A} (n \times n) $" src="form_796.png"/> and <img class="formulaInl" alt="$ \boldsymbol{B} (n\times 1) $" src="form_797.png"/> are constant matrices. <img class="formulaInl" alt="$ {\zeta} $" src="form_798.png"/> is white noise. For the <img class="formulaInl" alt="$ 2^{\mathrm{nd} } $" src="form_765.png"/> -order models the following state space representation may be chosen:</p>
<p class="formulaDsp">
<img class="formulaDsp" alt="\[ \begin{bmatrix} \dot x_1 \\ \dot x_2 \end{bmatrix} = \begin{bmatrix} 0 &amp; 1 \\ -a_0 &amp; -a_1 \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \end{bmatrix} + \begin{bmatrix} b_1 \\ b_0 -a_1 b_1 \end{bmatrix} {\zeta} \tag{5.11} \]" src="form_799.png"/>
</p>
<p>where <img class="formulaInl" alt="$ x_1 $" src="form_800.png"/> is the wind gust velocity and <img class="formulaInl" alt="$ x_2 $" src="form_801.png"/> is an auxiliary variable.</p>
<p>For the <img class="formulaInl" alt="$ 3^{\mathrm{rd} } $" src="form_792.png"/> -order models a similar state space representation is chosen:</p>
<p class="formulaDsp">
<img class="formulaDsp" alt="\[ \begin{bmatrix} \dot x_1 \\ \dot x_2 \\ \dot x_3 \\ \end{bmatrix} = \begin{bmatrix} 0 &amp; 1 &amp; 0 \\ 0 &amp; 0 &amp; 1 \\ -a_0&amp; -a_1&amp; -a_2 \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} + \begin{bmatrix} b_2 \\ b_1 -a_2 b_2 \\ b_0 - a_2 b_1 - (a_1 - a_2^2)b_2 \end{bmatrix} \zeta \tag{5.12} \]" src="form_802.png"/>
</p>
<p>With excitation by a white-noise source of unit power density, these matrices now define a continuous-time state-space model that generates an output that has a wind gust spectrum equal to that of the specified spectrum.</p>
<h1><a class="anchor" id="tm_generation_wind"></a>
Wind sampling</h1>
<p>The wind gusts in mean wind direction and normal to mean wind direction are generated by either FFT or by a state-space model driven by white noise.</p>
<p>The wind gust in different positions can be fully correlated by using the same series or uncorrelated by generating stochastic independent time series at each point.</p>
<h1><a class="anchor" id="tm_generation_sampling"></a>
Sampling of waves and first-order responses</h1>
<p>The harmonic components differ slightly from what was said in previous sections due to the directionality of waves.</p>
<p>Based on the assumption that the directionality of the wave elevation spectra can be written:</p>
<p class="formulaDsp">
<img class="formulaDsp" alt="\[ S_\zeta (\beta, \omega) = \theta (\beta ) S_\zeta (\omega ) \tag{5.13} \]" src="form_803.png"/>
</p>
<p>then the surface elevation can be expressed as:</p>
<p class="formulaDsp">
<img class="formulaDsp" alt="\[ \zeta(t) = \sum_{j=1}^{N_\beta}\, \sum_{k=1}^{N_\omega}\, \mathrm{Re}\, \left( \tilde \zeta_{jk}e^{i\omega_k t} \right) \tag{5.14} \]" src="form_804.png"/>
</p>
<p class="formulaDsp">
<img class="formulaDsp" alt="\[ |\zeta_{jk}| = \sqrt{2S_\eta (\omega_k ) \Delta \omega_k \theta_j (\beta_j)\Delta \beta_j} \tag{5.15} \]" src="form_805.png"/>
</p>
<p class="formulaDsp">
<img class="formulaDsp" alt="\[ \mathrm{arg} \tilde \zeta_{jk} = \phi_{P_{jk}} + \phi_{\zeta_{jk}} - \frac{\pi}{2} \tag{5.16} \]" src="form_806.png"/>
</p>
<p>where:</p>
 
<table width="800">
    <tr> <td align="left" width = "9%">\( \phi_{P_{jk}} \) </td><td align="left">position dependent phase angle
    </td></tr>
    <tr> <td align="left">\( \phi_{\zeta_{jk}} \) </td><td align="left">random phase angle </td></tr>
</table>
<p>The subtraction of <img class="formulaInl" alt="$ \pi/2 $" src="form_761.png"/> gives the wanted shape of the surface according to Section <a class="el" href="a00006.html#tm_environment_waves">Waves</a> in Chapter <a class="el" href="a00006.html#tm_environment">Environment</a>:</p>
<p class="formulaDsp">
<img class="formulaDsp" alt="\[ \zeta (t) = \zeta_a \sin{(\omega t + \phi_\zeta)} \tag{5.17} \]" src="form_807.png"/>
</p>
<p>The harmonic components of velocity and acceleration of water particles and first order responses are found simply by multiplying their complex transfer functions with the corresponding harmonic component of the wave elevation.</p>
<p>The order of summation in <a class="el" href="a00010.html#tm-eq-5-7">Eq. (5.7)</a> is not important. Thus, it is favourable first to sum over the directions and then perform one FFT or sum over the frequencies.</p>
<h1><a class="anchor" id="tm_generation_second"></a>
Second-order time series</h1>
<p>This section is limited to describing generation of time series of second-order forces. The quadratic term of the wave force is written (compare with Chapter <a class="el" href="a00008.html#tm_force_general">Force Models</a>):</p>
<p class="formulaDsp">
<img class="formulaDsp" alt="\[ q_{W\! A2} (t) = \int_{-\infty}^{\infty}\!{\int_{-\infty}^{\infty}\!{h^{(2)} (\tau_1,\tau_2) \zeta(t-\tau_2)} \textrm{d}{\tau_1} }\textrm{d}{\tau_2} \tag{5.18} \]" src="form_808.png"/>
</p>
<p>The second-order force can thus be generated by use of a:</p>
<ul>
<li>quadratic filter</li>
<li>double sum of harmonic components</li>
</ul>
<h2><a class="anchor" id="tm_generation_second_quadratic"></a>
Quadratic filter</h2>
<p>To be completed.</p>
<h2><a class="anchor" id="tm_generation_second_double"></a>
Double sum of harmonic components</h2>
<p>The double sum of harmonic components can be written:</p>
<p class="formulaDsp">
<img class="formulaDsp" alt="\[ q_{W\! A}(t) = \mathrm{Re} \sum_{j}\, \sum_{k}\, \sqrt{S_{\eta} (\omega_j) S_{\eta}(\omega_k) \Delta \omega_j \Delta \omega_k} H_2 (\omega_j , \omega_k) e^{i (\epsilon_j + \epsilon_k)} e^{i(\omega_j + \omega_k)t} \tag{5.19} \]" src="form_809.png"/>
</p>
<p>For pre-generation of waves this is obtained by a <img class="formulaInl" alt="$ 2^{\mathrm{nd}} $" src="form_810.png"/> order FFT.</p>
<h2><a class="anchor" id="tm_generation_second_simplified"></a>
Simplified model (Newman)</h2>
<p>According to Newman, Chapter <a class="el" href="a00008.html#tm_force_general">Force Models</a>, the wave force can be written:</p>
<p class="formulaDsp">
<img class="formulaDsp" alt="\[ q(t) = \overline{(L^+(t))^2} - \overline{(L^-(t))^2} \tag{5.20} \]" src="form_811.png"/>
</p>
<p>where</p>
<p class="formulaDsp">
<img class="formulaDsp" alt="\[ L^{\pm} = \mathrm{Re} \sum_{m}\, \zeta_m \sqrt{\pm 2H_{mm}^{(2-)} e^{i\omega_m t}} \tag{5.21} \]" src="form_812.png"/>
</p>
<p><img class="formulaInl" alt="$ L^{\pm} $" src="form_813.png"/> is found either by ordinary summation of the harmonic components or by use of FFT.</p>
<p>Alternatively,</p>
<p class="formulaDsp">
<img class="formulaDsp" alt="\[ u(t) = \sum_{m}\, \sqrt{H_{mm}^{(2-)}} \mathrm{Re} {\left( \tilde\zeta_m e^{i\omega_m t} \right) } \qquad v(t) = \sum_{m}\, \sqrt{H_{mm}^{(2-)}} \mathrm{Im} {\left( \tilde\zeta_m e^{i\omega_m t} \right) } \tag{5.22} \]" src="form_814.png"/>
</p>
<p>where <img class="formulaInl" alt="$ H_{mm}^{(2-)} $" src="form_815.png"/> can be positive and negative, and <img class="formulaInl" alt="$ v (t) $" src="form_816.png"/> is the Hilbert transform of <img class="formulaInl" alt="$ u(t) $" src="form_251.png"/> .</p>
<p>Then a result for the slowly varying force can then be seen from</p>
<p class="formulaDsp">
<img class="formulaDsp" alt="\[ q(t) = \mathrm{Re} \left( \sum_{m}\, \sum_{n}\,\tilde \zeta_m\tilde \zeta_n^* H_{mm}^{(2-)} e^{i(\omega_m - \omega_n)t} \right) = \mathrm{Re} \left( u(t)^2 + v(t)^2 \right) \tag{5.23} \]" src="form_817.png"/>
</p>
<h2><a class="anchor" id="tm_generation_second_short"></a>
Short-crested waves</h2>
<p>The effect of short-crested waves can be found by determining the contribution to the force from unidirectional waves and superimposing contributions from wave components to find the total force.</p>
<h2><a class="anchor" id="tm_generation_second_low"></a>
Low-pass filtering</h2>
<p>The <img class="formulaInl" alt="$ \mathrm{1^{st}} $" src="form_818.png"/> order wave response should preferably be calculated at the mean position of the wave-frequency motion. This implies that the horizontal position for bodies where the total position is solved in the time domain (body type no. 1), should be low-pass filtered before the wave responses are calculated. This is not implemented.</p>
<p>The <img class="formulaInl" alt="$ \mathrm{2^{nd}} $" src="form_819.png"/> order wave responses should preferably be calculated from an (moving) average position. The position input to the <img class="formulaInl" alt="$ \mathrm{2^{nd}} $" src="form_819.png"/> order wave response calculations should therefore be strongly low-pass filtered. This is not implemented. </p>
</div></div><!-- contents -->
	</body>
</html>