Hello, i have system:
function model(u, p ,t)
E, x, u_, y = u
τ, α, τ_D, J, U0, ΔU0, τ_y, β, xthr, ythr, I0 = p
U(y, U0, ΔU0, ythr) = U0 + ΔU0 / ( 1 + exp( -50 * ( y - ythr ) ) )
σ(x, xthr)= 1 / (1 + exp(-20 * (x - xthr)));
du1 = (-E + α * log( 1 + exp( ( J * u_ * x * E + I0 ) / α ) )) / τ
du2 = ( 1 - x ) / τ_D - u_ * x * E
du3 = (U(y, U0, ΔU0, ythr) - u_) / τ_F + U(y, U0, ΔU0, ythr) * ( 1 - u_ ) * E
du4 = -y / τ_y + β * σ(x, xthr)
return SVector(du1, du2, du3, du4)
end;
and i need plot Poincare map on plane, which is built on three points, which are the equilibrium states of the system. I have coordinates equilibrium points and i plot plane as follow
function plane_v2(x, y, fp1, fp2, fp3)
"""
E 1
x 2
u 3
y 4
"""
x0 = fp1[2]
x1 = fp2[2]
x2 = fp3[2]
y0 = fp1[3]
y1 = fp2[3]
y2 = fp3[3]
z0 = fp1[1]
z1 = fp2[1]
z2 = fp3[1]
a = ( y1 - y0 ) * ( z2 - z0 ) - ( y2 - y0 ) * ( z1 - z0 )
b = ( z1-z0 ) * ( x2 -x0 ) - ( x1 - x0 ) * (z2 - z0)
c = ( x1 - x0 ) * ( y2 - y0 ) - ( x2 - x0 ) * ( y1 - y0 )
z = z0 .+ ( -( x .- x0 ) * a - (y .- y0) * b ) / c
return z
end
x_range = range( 0.0, 1.0, length = 1000 )
u_range = range( 0.0, 1.0, length = 1000 )
E_range = plane_v2( x_range, u_range, first_eq, second_eq, third_eq )
how do I properly use callbacks to get a poincare mapping? I tried use DynamicalSystems.jl and it didn’t work out