This is my first time using this package and I need to get a bifurcation diagram for the following system
function sigma(x)
return 1.0 / ( 1.0 + exp( -10.0 * ( x - ( - 0.25 ) ) ) )
end
function HR(u, p)
a, b, c, d, s, xr, r, I, vs, k1, k2, el_link = p
x1, y1, z1, x2, y2, z2 = u
du1 = y1 + b * x1 ^ 2 - a * x1 ^3 - z1 + I - k1 * ( x1 - vs ) * sigma(x2) + el_link * ( x2 - x1 )
du2 = c - d * x1 ^2 - y1
du3 = r * ( s * ( x1 - xr ) - z1 )
du4 = y2 + b * x2 ^ 2 - a * x2 ^3 - z2 + I - k2 * ( x2 - vs ) * sigma(x1) + el_link * ( x1 - x2 )
du5 = c - d * x2 ^2 - y2
du6 = r * ( s * ( x2 - xr ) - z2 )
return [du1, du2, du3,
du4, du5, du6]
end
a = 1.0; b = 3.0; c = 1.0; d = 5.0;
xr = -1.6; r = 0.01; s = 5.; I = 4.; xv = 2.;
k1= -0.17; k2 = -0.17;
k = 0.0
par = (a = 1.0, b = 3.0, c = 1.0, d = 5.0, xr = -1.6, r = 0.01, s = 5.0, I = 4.0, xv = 2.0, k1= -0.17, k2 = -0.17, k = 0.0)
I following example from documentation and use next setting for NewtonPar
and ContinuationPar
prob_HR = BifurcationProblem(HR, zeros(6), par, (@lens _.k),
J = (x, p) -> ForwardDiff.jacobian(z -> HR(z, p), x))
# newton options
opt_newton = NewtonPar(tol = 1e-11, maxIter = 10000)
# continuation options
opts_br = ContinuationPar(
pMax = 0.5, pMin = 0.0,
detectBifurcation = 3, nev = 6,
newtonOptions = opt_newton, maxSteps = 10000, nInversion = 4,
tolBisectionEigenvalue = 1e-11, dsminBisection = 1e-11)
bdiag = bifurcationdiagram(prob_HR, PALC(), 3,
(args...) -> setproperties(opts_br; pMin = 0.0, pMax = 0.5, nInversion = 4, detectBifurcation = 3, maxBisectionSteps=100, newtonOptions = opt_newton);
recordFromSolution = (x, p) -> norminf(x),
xwnormC = norminf)
In result i get
In short, I know that there are bifurcations with a change in the parameter `k’. I have a diagram of the spectrum of Lyapunov exponents, projections of phase space with different values of k, and they show that there is a transition from chaos to regularity.
I understand that the diagram is most likely not correct and due to the wrong choice of settings. How to choose the right parameters and are there any recommendations for this?
I also attach a spectrum diagram and a projection of the phase space so that it is clearly visible that the diagram does not look quite correct. (The blue and red trajectories correspond to two different attractors)