Simulate a hysteresis loop with a variety of possible parameters.
mloop(cx = 0, cy = 0, retention = 0.2, b.x = 0.6, b.y = 0.8,n = 1, m = 1,
sd.x = 0, sd.y = 0, phase.angle = 0, n.points = 24,
period = 24,extended.classical=FALSE,seed=NULL)
mloop2r(cx=0,cy=0,retention.above=0.2,retention.below=0.15,b.x=0.6,b.y=0.8,n=1,
m=1,sd.x=0,sd.y=0,phase.angle=0,n.points=24,period=24,
extended.classical=FALSE,seed=NULL)
mloop returns an object of class hysteresisloop
.
estimated values of various coefficients and derived parameters of the hysteresis loop. See loop.parameters
the input x.
the output y.
Positive integer for the split line parameter. If n=1, split line is linear; If n is even, split line has a u shape; If n is odd and higher than 1, split line has a chair or classical shape.
Positive odd integer for the bulging parameter, indicates degree of outward curving (1=highest level of bulging).
number. Saturation point x coordinate. Horizontal distance from the center to the maximum value of the input challenge.
number. Saturation point y coordinate. Vertical distance from the center to the point where the input is at its maximum.
number in degrees. Defines the starting point of the loop. The initial angle of the input function at its origin.
number. Center of input x.
number. Center of output y.
number. Split point, represents vertical distance from center to upper loop trajectory. It is the intersection of the loop and the output axis characterizing the distortion in the response at the average input challenge. Assumes symmetrical curve above and below split line.
number. Retention above the split line. mloop2r
creates a loop where retention above and below the split line may be different.
number. Retention below the split line.
number. Standard deviation of the normally distributed variation in the input vector x.
number. Standard deviation of the normally distributed variation in the output vector y.
number of points on loop.
number of equally spaced points required to make a full loop.
logical. If true, fit a classical hysteresis loop regardless of n. Uses
integer. Starting seed.
Spencer Maynes, Fan Yang, and Anne Parkhurst.
Simulates input and output variables x and y that form a hysteresis loop of the form
Lapshin, R. (1995) Analytical model for the approximation of hysteresis loop and its application to the scanning tunneling microscope.
Fit a hysteresis loop with the function floop
.
#Simulate a loop with n=3, m=1, retention=0.9
loop1 <- mloop(cx=5,cy=8,retention=0.9,sd.x=0.01,sd.y=0.05,n=3,m=1)
loopmodel <- floop(loop1$x,loop1$y,n=3,m=1)
loopmodel
##Plot hysteresis loop.
plot(loopmodel,main="Simulated Hysteresis Loop n=3 m=1",xlab="Input",
ylab="Output",values="hysteresis.all")
Run the code above in your browser using DataLab