data.gen.HL: Generate predictor and response data: Hysteresis Loop

View source: R/data_gen_HL.R

data.gen.HLR Documentation

Generate predictor and response data: Hysteresis Loop

Description

Generate predictor and response data: Hysteresis Loop

Usage

data.gen.HL(
  nobs = 512,
  a = 0.8,
  b = 0.6,
  c = 0.2,
  m = 3,
  n = 5,
  fp = 25,
  fd,
  sd.x = 0.1,
  sd.y = 0.1
)

Arguments

nobs

The data length to be generated.

a

The a parameter. Default: 0.8.

b

The b parameter. Default: 0.6.

c

The c parameter. Default: 0.2.

m

Positive integer for the split line parameter. If m=1, split line is linear; If m is even, split line has a u shape; If m is odd and higher than 1, split line has a chair or classical shape.

n

Positive odd integer for the bulging parameter, indicates degree of outward curving (1=highest level of bulging).

fp

The frequency in the generated response. fp = 25 used in the WRR paper.

fd

A vector of frequencies for potential predictors. fd = c(3,5,10,15,25,30,55,70,95) used in the WRR paper.

sd.x

The noise level in the predictor.

sd.y

The noise level in the response.

Details

The Hysteresis is a common nonlinear phenomenon in natural systems and it can be numerical simulated by the following formulas:

x_{t} = a*cos(2pi*f*t)

y_{t} = b*cos(2pi*f*t)^m - c*sin(2pi*f*t)^n

The default selection for the system parameters (a = 0.8, b = 0.6, c = 0.2, m = 3, n = 5) is known to generate a classical hysteresis loop.

Value

A list of 3 elements: a vector of response (x), a matrix of potential predictors (dp) with each column containing one potential predictor, and a vector of true predictor numbers.

References

LAPSHIN, R. V. 1995. Analytical model for the approximation of hysteresis loop and its application to the scanning tunneling microscope. Review of Scientific Instruments, 66, 4718-4730.

Examples

###synthetic example - Hysteresis loop
#frequency, sampled from a given range
fd <- c(3,5,10,15,25,30,55,70,95)

data.HL <- data.gen.HL(m=3,n=5,nobs=512,fp=25,fd=fd)
plot.ts(cbind(data.HL$x,data.HL$dp))

synthesis documentation built on Nov. 2, 2023, 5:51 p.m.