Generate a 2D Langevin process

Share:

Description

timeseries2D generates a two-dimensional Langevin process using a simple Euler integration. The drift function is a cubic polynomial, the diffusion function a quadratic.

Usage

1
2
3
4
5
6
timeseries2D(N, startpointx = 0, startpointy = 0, D1_1 = matrix(c(0, -1,
  rep(0, 14)), nrow = 4), D1_2 = matrix(c(0, 0, 0, 0, -1, rep(0, 11)), nrow =
  4), g_11 = matrix(c(1, 0, 0, 0, 0, 0, 0, 0, 0), nrow = 3),
  g_12 = matrix(c(0, 0, 0, 0, 0, 0, 0, 0, 0), nrow = 3), g_21 = matrix(c(0,
  0, 0, 0, 0, 0, 0, 0, 0), nrow = 3), g_22 = matrix(c(1, 0, 0, 0, 0, 0, 0, 0,
  0), nrow = 3), sf = 1000, dt = 0)

Arguments

N

a scalar denoting the length of the time-series to generate.

startpointx

a scalar denoting the starting point of the time series x.

startpointy

a scalar denoting the starting point of the time series y.

D1_1

a 4x4 matrix denoting the coefficients of D1 for x.

D1_2

a 4x4 matrix denoting the coefficients of D1 for y.

g_11

a 3x3 matrix denoting the coefficients of g11 for x.

g_12

a 3x3 matrix denoting the coefficients of g12 for x.

g_21

a 3x3 matrix denoting the coefficients of g21 for y.

g_22

a 3x3 matrix denoting the coefficients of g22 for y.

sf

a scalar denoting the sampling frequency.

dt

a scalar denoting the maximal time step of integration. Default dt=0 yields dt=1/sf.

Details

The elements a_{ij} of the matrices are defined by the corresponding equations for the drift and diffusion terms:

D^1_{1,2} = ∑_{i,j=1}^4 a_{ij} x_1^{(i-1)}x_2^{(j-1)}

with a_{ij} = 0 for i + j > 5.

g_{11,12,21,22} = ∑_{i,j=1}^3 a_{ij} x_1^{(i-1)}x_2^{(j-1)}

with a_{ij} = 0 for i + j > 4

Value

timeseries2D returns a time-series object with the generated time-series as colums.

Author(s)

Philip Rinn

See Also

timeseries1D