duffing_oscillator {ARGOS}R Documentation

Duffing Oscillator

Description

Simulates the Duffing oscillator with optional noise.

Usage

duffing_oscillator(
  n,
  dt,
  init_conditions,
  gamma_value,
  kappa_value,
  epsilon_value,
  snr = Inf
)

Arguments

n

Number of time points (rounded to the nearest integer).

dt

Time step between observations.

init_conditions

Initial conditions as a numeric vector of length 2.

gamma_value

Value of gamma parameter.

kappa_value

Value of kappa parameter.

epsilon_value

Value of epsilon parameter.

snr

Signal-to-noise ratio (in dB). Use Inf for no noise.

Details

This function simulates a Duffing oscillator with the specified parameters. It uses the specified time step and initial conditions to compute the system's state over time. If a non-Infinite SNR is provided, Gaussian noise is added to the system.

Value

A numeric matrix representing the system's state over time. Each row corresponds to a time point, and each column represents a variable.

Examples

# Simulate a Duffing oscillator with 100 time points and no noise
data <- duffing_oscillator(
  n = 100,
  dt = 0.01,
  init_conditions = c(2, 6),
  gamma_value = 0.1,
  kappa_value = 1,
  epsilon_value = 5,
  snr = Inf
)


[Package ARGOS version 0.1.1 Index]